|
|
@ -24,7 +24,8 @@ import org.mozilla.fenix.helpers.HomeActivityTestRule
|
|
|
|
private const val EXPECTED_SUPPRESSION_COUNT = 19
|
|
|
|
private const val EXPECTED_SUPPRESSION_COUNT = 19
|
|
|
|
@Suppress("TopLevelPropertyNaming") // it's silly this would have a different naming convention b/c no const
|
|
|
|
@Suppress("TopLevelPropertyNaming") // it's silly this would have a different naming convention b/c no const
|
|
|
|
private val EXPECTED_RUNBLOCKING_RANGE = 0..1 // CI has +1 counts compared to local runs: increment these together
|
|
|
|
private val EXPECTED_RUNBLOCKING_RANGE = 0..1 // CI has +1 counts compared to local runs: increment these together
|
|
|
|
private const val EXPECTED_RECYCLER_VIEW_CONSTRAINT_LAYOUT_CHILDREN = 4
|
|
|
|
private val EXPECTED_RECYCLER_VIEW_CONSTRAINT_LAYOUT_CHILDREN =
|
|
|
|
|
|
|
|
4..5 // The messaging framework is not deterministic and could add a +1 to the count
|
|
|
|
private const val EXPECTED_NUMBER_OF_INFLATION = 14
|
|
|
|
private const val EXPECTED_NUMBER_OF_INFLATION = 14
|
|
|
|
|
|
|
|
|
|
|
|
private val failureMsgStrictMode = getErrorMessage(
|
|
|
|
private val failureMsgStrictMode = getErrorMessage(
|
|
|
@ -87,10 +88,9 @@ class StartupExcessiveResourceUseTest {
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals(failureMsgStrictMode, EXPECTED_SUPPRESSION_COUNT, actualSuppresionCount)
|
|
|
|
assertEquals(failureMsgStrictMode, EXPECTED_SUPPRESSION_COUNT, actualSuppresionCount)
|
|
|
|
assertTrue(failureMsgRunBlocking + "actual: $actualRunBlocking", actualRunBlocking in EXPECTED_RUNBLOCKING_RANGE)
|
|
|
|
assertTrue(failureMsgRunBlocking + "actual: $actualRunBlocking", actualRunBlocking in EXPECTED_RUNBLOCKING_RANGE)
|
|
|
|
assertEquals(
|
|
|
|
assertTrue(
|
|
|
|
failureMsgRecyclerViewConstraintLayoutChildren,
|
|
|
|
failureMsgRecyclerViewConstraintLayoutChildren + "actual: $actualRunBlocking",
|
|
|
|
EXPECTED_RECYCLER_VIEW_CONSTRAINT_LAYOUT_CHILDREN,
|
|
|
|
actualRecyclerViewConstraintLayoutChildren in EXPECTED_RECYCLER_VIEW_CONSTRAINT_LAYOUT_CHILDREN,
|
|
|
|
actualRecyclerViewConstraintLayoutChildren
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
assertEquals(failureMsgNumberOfInflation, EXPECTED_NUMBER_OF_INFLATION, actualNumberOfInflations)
|
|
|
|
assertEquals(failureMsgNumberOfInflation, EXPECTED_NUMBER_OF_INFLATION, actualNumberOfInflations)
|
|
|
|
}
|
|
|
|
}
|
|
|
|