Home
last modified time | relevance | path

Searched refs:rule (Results 1 – 25 of 133) sorted by relevance

123456

/platform_testing/libraries/health/rules/tests/src/android/platform/test/rule/
DTracePointRuleTest.java16 package android.platform.test.rule;
37 TestableTracePointRule rule = new TestableTracePointRule(); in testNoNameGiven() local
38 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testNoNameGiven()
40 assertThat(rule.getOperations()).contains("begin: mthd(clzz)"); in testNoNameGiven()
46 TestableTracePointRule rule = new TestableTracePointRule(""); in testEmptyStringGiven() local
47 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testEmptyStringGiven()
49 assertThat(rule.getOperations()).contains("begin: mthd(clzz)"); in testEmptyStringGiven()
55 TestableTracePointRule rule = new TestableTracePointRule("FakeName"); in testTagGiven() local
56 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testTagGiven()
58 assertThat(rule.getOperations()).contains("begin: FakeName"); in testTagGiven()
[all …]
DTestWatcherTest.java16 package android.platform.test.rule;
38 TestableTestWatcher rule = in testAllCallsSuccessful() local
40 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testAllCallsSuccessful()
42 assertThat(rule.getOperations()) in testAllCallsSuccessful()
50 TestableTestWatcher rule = in testCallsFail_starting() local
53 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testCallsFail_starting()
57 assertThat(rule.getOperations()) in testCallsFail_starting()
66 TestableTestWatcher rule = in testCallsFail_statement() local
69 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testCallsFail_statement()
73 assertThat(rule.getOperations()) in testCallsFail_statement()
[all …]
DKillAppsRuleTest.java16 package android.platform.test.rule;
44 KillAppsRule rule = new KillAppsRule(); in testNoAppToKillFails() local
56 TestableKillAppsRule rule = new TestableKillAppsRule(new Bundle(), "example.package.name"); in testOneAppToKill() local
57 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testOneAppToKill()
59 assertThat(rule.getOperations()).containsExactly( in testOneAppToKill()
69 TestableKillAppsRule rule = new TestableKillAppsRule(new Bundle(), in testMultipleAppsToKill() local
73 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testMultipleAppsToKill()
75 assertThat(rule.getOperations()).containsExactly( in testMultipleAppsToKill()
90 TestableKillAppsRule rule = new TestableKillAppsRule(noKillAppsBundle, in testDisableKillsAppsRuleOption() local
93 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testDisableKillsAppsRuleOption()
[all …]
DUnlockScreenRuleTest.java16 package android.platform.test.rule;
40 TestableUnlockScreenRule rule = new TestableUnlockScreenRule(false, false); in testScreenOff() local
46 verify(rule.getUiDevice(), times(1)).wakeUp(); in testScreenOff()
47 verify(rule.getUiDevice(), times(1)).pressMenu(); in testScreenOff()
50 rule.apply(testStatement, Description.createTestDescription("clzz", "mthd")).evaluate(); in testScreenOff()
56 TestableUnlockScreenRule rule = new TestableUnlockScreenRule(true, false); in testScreenLocked() local
62 verify(rule.getUiDevice(), times(0)).wakeUp(); in testScreenLocked()
63 verify(rule.getUiDevice(), times(1)).pressMenu(); in testScreenLocked()
66 rule.apply(testStatement, Description.createTestDescription("clzz", "mthd")).evaluate(); in testScreenLocked()
72 TestableUnlockScreenRule rule = new TestableUnlockScreenRule(true, true); in testScreenOn() local
[all …]
DQuickstepPressureRuleTest.java16 package android.platform.test.rule;
37 QuickstepPressureRule rule = new QuickstepPressureRule(); in testNoAppToOpenFails() local
47 TestableQuickstepPressureRule rule = in testOneAppToOpen() local
49 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testOneAppToOpen()
51 assertThat(rule.getOperations()) in testOneAppToOpen()
59 TestableQuickstepPressureRule rule = in testMultipleAppsToOpen() local
62 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testMultipleAppsToOpen()
64 assertThat(rule.getOperations()) in testMultipleAppsToOpen()
DIorapCompilationRuleTest.java16 package android.platform.test.rule;
45 IorapCompilationRule rule = new IorapCompilationRule(); in testNoAppToKillFails() local
57 TestableIorapCompilationRule rule = in testDoingNothingWhenParamsUnset() local
59 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testDoingNothingWhenParamsUnset()
61 assertThat(rule.getOperations()).containsExactly( in testDoingNothingWhenParamsUnset()
73 TestableIorapCompilationRule rule = in testDisablingIorapdWhenParamsAreSet() local
75 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testDisablingIorapdWhenParamsAreSet()
77 assertThat(rule.getOperations()).containsExactly( in testDisablingIorapdWhenParamsAreSet()
93 TestableIorapCompilationRule rule = in testEnablingIorapdWhenParamsAreSet() local
95 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testEnablingIorapdWhenParamsAreSet()
[all …]
DCompilationFilterRuleTest.java16 package android.platform.test.rule;
41 CompilationFilterRule rule = new CompilationFilterRule(); in testNoAppToCompileFails() local
52 TestableCompilationFilterRule rule = new TestableCompilationFilterRule(badFilterBundle, in testAppToCompile_badFilterThrows() local
55 rule.apply(rule.getTestStatement(), TEST_DESC).evaluate(); in testAppToCompile_badFilterThrows()
66 TestableCompilationFilterRule rule = new TestableCompilationFilterRule(filterBundle, in testAppToCompile_failCompilationThrows() local
75 rule.apply(rule.getTestStatement(), TEST_DESC).evaluate(); in testAppToCompile_failCompilationThrows()
86 TestableCompilationFilterRule rule = new TestableCompilationFilterRule(filterBundle, in testOneAppToCompile() local
94 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd1")) in testOneAppToCompile()
98 assertThat(rule.getOperations()).containsExactly("test", compileCmd) in testOneAppToCompile()
107 TestableCompilationFilterRule rule = new TestableCompilationFilterRule(filterBundle, in testMultipleAppsToCompile() local
[all …]
DDropCachesRuleTest.java16 package android.platform.test.rule;
41 TestableDropCachesRule rule = new TestableDropCachesRule(new Bundle()); in testDropCachesCommand() local
42 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testDropCachesCommand()
44 assertThat(rule.getOperations()).containsExactly( in testDropCachesCommand()
45 rule.getDropCacheScriptPath(), "test") in testDropCachesCommand()
56 TestableDropCachesRule rule = new TestableDropCachesRule(noDropCacheBundle); in testNoDropCacheFlag() local
58 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testNoDropCacheFlag()
60 assertThat(rule.getOperations()).containsExactly("test") in testNoDropCacheFlag()
DNotificationPressureRuleTest.java17 package android.platform.test.rule;
42 TestableNotificationPressureRule rule = in testPostNotifications_withoutPackage() local
49 verify(rule.initNotificationHelper()) in testPostNotifications_withoutPackage()
54 rule.apply(testStatement, Description.createTestDescription("clzz", "mthd")) in testPostNotifications_withoutPackage()
58 verify(rule.initNotificationHelper()).cancelNotifications(); in testPostNotifications_withoutPackage()
67 TestableNotificationPressureRule rule = in testPostNotifications_withPackage() local
74 verify(rule.initNotificationHelper()) in testPostNotifications_withPackage()
79 rule.apply(testStatement, Description.createTestDescription("clzz", "mthd")).evaluate(); in testPostNotifications_withPackage()
82 verify(rule.initNotificationHelper()).cancelNotifications(); in testPostNotifications_withPackage()
DFinishActivitiesWithoutProcessKillRuleTest.java16 package android.platform.test.rule;
48 FinishActivitiesWithoutProcessKillRule rule = in testNoAppToFinishActivitiesFails() local
61 TestableRule rule = new TestableRule(new Bundle(), "example.package.name"); in testFinishActivities() local
62 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testFinishActivities()
64 assertThat(rule.getOperations()).containsExactly( in testFinishActivities()
80 TestableRule rule = new TestableRule(bundle, "example.package.name"); in testDisableFinishActivities() local
81 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testDisableFinishActivities()
83 assertThat(rule.getOperations()).containsExactly("test").inOrder(); in testDisableFinishActivities()
DRemoveAppFromStackRuleTest.java16 package android.platform.test.rule;
49 RemoveAppFromStackRule rule = new RemoveAppFromStackRule(); in testNoAppToRemoveFromStackFails() local
61 TestableRule rule = new TestableRule(new Bundle(), "example.package.name"); in testRemoveAppFromStack() local
62 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testRemoveAppFromStack()
64 assertThat(rule.getOperations()).containsExactly( in testRemoveAppFromStack()
79 TestableRule rule = new TestableRule(noRemoveAppFromStackBundle, "example.package.name"); in testDisableRemoveAppFromStack() local
80 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testDisableRemoveAppFromStack()
82 assertThat(rule.getOperations()).containsExactly("test").inOrder(); in testDisableRemoveAppFromStack()
DStopwatchRuleTest.java17 package android.platform.test.rule;
40 StopwatchRule rule = new StopwatchRule(); in testMeasurementIsCorrect() local
41 rule.apply( in testMeasurementIsCorrect()
52 Bundle metric = rule.getMetric(); in testMeasurementIsCorrect()
61 StopwatchRule rule = new StopwatchRule(); in testMetricSendToInstr() local
63 rule.setInstrumentation(instr); in testMetricSendToInstr()
64 rule.apply( in testMetricSendToInstr()
71 verify(instr).sendStatus(StopwatchRule.INST_STATUS_IN_PROGRESS, rule.getMetric()); in testMetricSendToInstr()
DPressHomeRuleTest.java16 package android.platform.test.rule;
46 TestablePressHomeRule rule = new TestablePressHomeRule(pressHomeBundle); in testPressHomeEnabled() local
52 verify(rule.getUiDevice(), never()).pressHome(); in testPressHomeEnabled()
55 rule.apply(testStatement, Description.createTestDescription("clzz", "mthd")).evaluate(); in testPressHomeEnabled()
57 verify(rule.getUiDevice(), times(1)).pressHome(); in testPressHomeEnabled()
68 TestablePressHomeRule rule = new TestablePressHomeRule(pressHomeBundle); in testPressHomeDisabled() local
74 verify(rule.getUiDevice(), never()).pressHome(); in testPressHomeDisabled()
77 rule.apply(testStatement, Description.createTestDescription("clzz", "mthd")).evaluate(); in testPressHomeDisabled()
79 verify(rule.getUiDevice(), times(0)).pressHome(); in testPressHomeDisabled()
DCoolDownRuleTest.java16 package android.platform.test.rule;
67 TestableRule rule = getDefaultRule(screenOn, maxWait, abortOnTimeout); in testCoolDownNormal() local
72 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testCoolDownNormal()
74 assertThat(rule.getOperations()) in testCoolDownNormal()
94 TestableRule rule = new TestableRule(screenOn, mThermalHelper); in testCoolDownFallback() local
95 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testCoolDownFallback()
97 assertThat(rule.getOperations()).containsExactly(OPS_TEST).inOrder(); in testCoolDownFallback()
106 TestableRule rule = getDefaultRule(screenOn, maxWait, abortOnTimeout); in testCoolDownTimeout() local
112 rule.apply(rule.getTestStatement(), Description.createTestDescription("clzz", "mthd")) in testCoolDownTimeout()
114 assertThat(rule.getOperations()) in testCoolDownTimeout()
[all …]
DNaturalOrientationRuleTest.java16 package android.platform.test.rule;
41 TestableNaturalOrientationRule rule = new TestableNaturalOrientationRule(); in testNaturalOrientationSetAndUnset() local
46 verify(rule.getUiDevice(), times(1)).setOrientationNatural(); in testNaturalOrientationSetAndUnset()
47 verify(rule.getUiDevice(), never()).unfreezeRotation(); in testNaturalOrientationSetAndUnset()
50 rule.apply(testStatement, Description.createTestDescription("clzz", "mthd")).evaluate(); in testNaturalOrientationSetAndUnset()
52 verify(rule.getUiDevice(), times(1)).unfreezeRotation(); in testNaturalOrientationSetAndUnset()
DDex2oatPressureRuleTest.java16 package android.platform.test.rule;
68 private Dex2oatPressureRule rule; field in Dex2oatPressureRuleTest
74 rule = spy(new Dex2oatPressureRule()); in setUp()
92 .when(rule) in setUp()
103 rule.apply(createTestStatement(10L), TEST_DESCRIPTION).evaluate(); in testInvokesCompilation()
104 verify(rule, times(1)).runCompileCommand(packageName, Dex2oatPressureRule.SPEED_FILTER); in testInvokesCompilation()
115 rule.apply(createTestStatement(150L), TEST_DESCRIPTION).evaluate(); in testInvokesCompilationCyclically()
117 verify(rule, atLeastOnce()) in testInvokesCompilationCyclically()
144 .when(rule) in testSchedulesCompilationUntilTestEnds()
148 rule.apply(createTestStatement(800L), TEST_DESCRIPTION).evaluate(); in testSchedulesCompilationUntilTestEnds()
[all …]
DGarbageCollectRuleTest.java16 package android.platform.test.rule;
44 GarbageCollectRule rule = new GarbageCollectRule(); in testNoAppToGcFails() local
56 GarbageCollectRule rule = new TestableGarbageCollectRule("package.name1"); in testCallsGcBeforeTest() local
66 rule.apply(testStatement, in testCallsGcBeforeTest()
DTestMetricRuleTest.java16 package android.platform.test.rule;
75 TestMetricRule rule = in testValidListener_testPasses() local
78 rule.apply(PASSING_STATEMENT, DESCRIPTION).evaluate(); in testValidListener_testPasses()
91 TestMetricRule rule = in testValidListener_testFails() local
95 rule.apply(FAILING_STATEMENT, DESCRIPTION).evaluate(); in testValidListener_testFails()
114 TestMetricRule rule = in testMultipleListeners_allValid() local
119 rule.apply(FAILING_STATEMENT, DESCRIPTION).evaluate(); in testMultipleListeners_allValid()
149 TestMetricRule rule = in testInvalidListenerNameThrows() local
163 TestMetricRule rule = createWithMetricCollectorNames(simpleName); in testSimpleClassNameAttemptedWithKnownPackage() local
/platform_testing/tests/apphealth/scenarios/tests/src/android/platform/test/scenario/facebook/
DOpenAppMicrobenchmark.java19 import android.platform.test.rule.CompilationFilterRule;
20 import android.platform.test.rule.CleanPackageRule;
21 import android.platform.test.rule.DropCachesRule;
22 import android.platform.test.rule.IorapCompilationRule;
23 import android.platform.test.rule.KillAppsRule;
24 import android.platform.test.rule.PressHomeRule;
/platform_testing/tests/health/scenarios/tests/src/android/platform/test/scenario/generic/
DOpenAppMicrobenchmark.java19 import android.platform.test.rule.CompilationFilterRule;
20 import android.platform.test.rule.DropCachesRule;
21 import android.platform.test.rule.IorapCompilationRule;
22 import android.platform.test.rule.KillAppsRule;
23 import android.platform.test.rule.PressHomeRule;
24 import android.platform.test.rule.FinishActivitiesWithoutProcessKillRule;
/platform_testing/tests/health/scenarios/tests/src/android/platform/test/scenario/performancelaunch/hermeticapp/
DOpenManyConfigResourceActivityMicrobenchmark.java19 import android.platform.test.rule.CompilationFilterRule;
20 import android.platform.test.rule.DropCachesRule;
21 import android.platform.test.rule.KillAppsRule;
22 import android.platform.test.rule.PressHomeRule;
DOpenEmptyActivityMicrobenchmark.java19 import android.platform.test.rule.CompilationFilterRule;
20 import android.platform.test.rule.DropCachesRule;
21 import android.platform.test.rule.KillAppsRule;
22 import android.platform.test.rule.PressHomeRule;
DOpenSimpleSurfaceGLActivityMicrobenchmark.java19 import android.platform.test.rule.CompilationFilterRule;
20 import android.platform.test.rule.DropCachesRule;
21 import android.platform.test.rule.KillAppsRule;
22 import android.platform.test.rule.PressHomeRule;
/platform_testing/tests/health/scenarios/tests/src/android/platform/test/scenario/businesscard/
DOpenAppMicrobenchmark.java19 import android.platform.test.rule.CompilationFilterRule;
20 import android.platform.test.rule.DropCachesRule;
21 import android.platform.test.rule.KillAppsRule;
22 import android.platform.test.rule.PressHomeRule;
/platform_testing/tests/health/scenarios/tests/src/android/platform/test/scenario/performancelaunch/
DOpenAppMicrobenchmark.java19 import android.platform.test.rule.CompilationFilterRule;
20 import android.platform.test.rule.DropCachesRule;
21 import android.platform.test.rule.KillAppsRule;
22 import android.platform.test.rule.PressHomeRule;

123456