Home
last modified time | relevance | path

Searched refs:kTestEnvironment (Results 1 – 20 of 20) sorted by relevance

/cts/tests/JobScheduler/src/android/jobscheduler/cts/
DStorageConstraintTest.java74 kTestEnvironment.setExpectedExecutions(1); in testNotLowConstraintExecutes()
75 kTestEnvironment.setExpectedWaitForRun(); in testNotLowConstraintExecutes()
78 kTestEnvironment.readyToRun(); in testNotLowConstraintExecutes()
81 kTestEnvironment.awaitExecution()); in testNotLowConstraintExecutes()
94 kTestEnvironment.setExpectedExecutions(0); in testNotLowConstraintFails()
95 kTestEnvironment.setExpectedWaitForRun(); in testNotLowConstraintFails()
99 kTestEnvironment.readyToRun(); in testNotLowConstraintFails()
102 kTestEnvironment.awaitExecution(250)); in testNotLowConstraintFails()
105 kTestEnvironment.setExpectedExecutions(1); in testNotLowConstraintFails()
106 kTestEnvironment.setExpectedWaitForRun(); in testNotLowConstraintFails()
[all …]
DBatteryConstraintTest.java141 kTestEnvironment.setExpectedExecutions(1); in testChargingConstraintExecutes()
142 kTestEnvironment.setExpectedWaitForRun(); in testChargingConstraintExecutes()
145 kTestEnvironment.readyToRun(); in testChargingConstraintExecutes()
148 kTestEnvironment.awaitExecution()); in testChargingConstraintExecutes()
161 kTestEnvironment.setExpectedExecutions(1); in testBatteryNotLowConstraintExecutes_withPower()
162 kTestEnvironment.setExpectedWaitForRun(); in testBatteryNotLowConstraintExecutes_withPower()
165 kTestEnvironment.readyToRun(); in testBatteryNotLowConstraintExecutes_withPower()
168 kTestEnvironment.awaitExecution()); in testBatteryNotLowConstraintExecutes_withPower()
186 kTestEnvironment.setExpectedExecutions(1); in testBatteryNotLowConstraintExecutes_withoutPower()
187 kTestEnvironment.setExpectedWaitForRun(); in testBatteryNotLowConstraintExecutes_withoutPower()
[all …]
DIdleConstraintTest.java114 kTestEnvironment.setExpectedExecutions(1); in verifyIdleState()
115 kTestEnvironment.setExpectedWaitForRun(); in verifyIdleState()
118 kTestEnvironment.readyToRun(); in verifyIdleState()
122 kTestEnvironment.awaitExecution()); in verifyIdleState()
130 kTestEnvironment.setExpectedExecutions(0); in verifyActiveState()
131 kTestEnvironment.setExpectedWaitForRun(); in verifyActiveState()
135 kTestEnvironment.readyToRun(); in verifyActiveState()
139 kTestEnvironment.awaitExecution(250)); in verifyActiveState()
258 kTestEnvironment.setExpectedExecutions(0); in runIdleJobStartsOnlyWhenIdle()
259 kTestEnvironment.setExpectedWaitForRun(); in runIdleJobStartsOnlyWhenIdle()
[all …]
DJobParametersTest.java61 kTestEnvironment.setExpectedExecutions(1); in testClipData()
64 assertTrue("Job didn't fire immediately", kTestEnvironment.awaitExecution()); in testClipData()
66 JobParameters params = kTestEnvironment.getLastStartJobParameters(); in testClipData()
79 kTestEnvironment.setExpectedExecutions(1); in testExtras()
82 assertTrue("Job didn't fire immediately", kTestEnvironment.awaitExecution()); in testExtras()
84 JobParameters params = kTestEnvironment.getLastStartJobParameters(); in testExtras()
96 kTestEnvironment.setExpectedExecutions(1); in testExpedited()
99 assertTrue("Job didn't fire immediately", kTestEnvironment.awaitExecution()); in testExpedited()
101 JobParameters params = kTestEnvironment.getLastStartJobParameters(); in testExpedited()
108 kTestEnvironment.setExpectedExecutions(1); in testExpedited()
[all …]
DTimingConstraintsTest.java50 kTestEnvironment.setExpectedExecutions(1); in testSchedulePeriodic()
54 kTestEnvironment.awaitExecution()); in testSchedulePeriodic()
67 kTestEnvironment.setExpectedExecutions(0); in testSchedulePeriodic_lowFlex()
71 kTestEnvironment.awaitExecution()); in testSchedulePeriodic_lowFlex()
82 kTestEnvironment.setExpectedExecutions(0); in testCancel()
88 kTestEnvironment.awaitTimeout()); in testCancel()
95 kTestEnvironment.setExpectedExecutions(1); in testExplicitZeroLatency()
99 kTestEnvironment.awaitExecution()); in testExplicitZeroLatency()
146 kTestEnvironment.setExpectedExecutions(1); in testJobParameters_unexpiredDeadline()
150 assertTrue("Failed to execute non-deadline job", kTestEnvironment.awaitExecution()); in testJobParameters_unexpiredDeadline()
[all …]
DComponentConstraintTest.java46 kTestEnvironment.setExpectedExecutions(1); in testScheduleAfterComponentEnabled()
50 assertTrue("Job with enabled service didn't fire.", kTestEnvironment.awaitExecution()); in testScheduleAfterComponentEnabled()
70 kTestEnvironment.setExpectedExecutions(0); in testComponentDisabledAfterSchedule()
75 assertTrue("Job with disabled service fired.", kTestEnvironment.awaitTimeout()); in testComponentDisabledAfterSchedule()
80 kTestEnvironment.setExpectedExecutions(1); in testComponentDisabledAndReenabledAfterSchedule()
85 assertTrue("Job with disabled service fired.", kTestEnvironment.awaitTimeout()); in testComponentDisabledAndReenabledAfterSchedule()
89 assertTrue("Job with enabled service didn't fire.", kTestEnvironment.awaitExecution()); in testComponentDisabledAndReenabledAfterSchedule()
DConnectivityConstraintTest.java125 kTestEnvironment.setExpectedExecutions(1); in testUnmeteredConstraintExecutes_withWifi()
133 kTestEnvironment.awaitExecution()); in testUnmeteredConstraintExecutes_withWifi()
146 kTestEnvironment.setExpectedExecutions(1); in testConnectivityConstraintExecutes_withWifi()
154 kTestEnvironment.awaitExecution()); in testConnectivityConstraintExecutes_withWifi()
169 kTestEnvironment.setExpectedExecutions(1); in testConnectivityConstraintExecutes_withWifi_DataSaverOn()
177 kTestEnvironment.awaitExecution()); in testConnectivityConstraintExecutes_withWifi_DataSaverOn()
190 kTestEnvironment.setExpectedExecutions(1); in testConnectivityConstraintExecutes_withMobile()
198 kTestEnvironment.awaitExecution()); in testConnectivityConstraintExecutes_withMobile()
215 kTestEnvironment.setExpectedExecutions(1); in testConnectivityConstraintExecutes_withMeteredWifi()
222 kTestEnvironment.awaitExecution()); in testConnectivityConstraintExecutes_withMeteredWifi()
[all …]
DDataTransferTest.java56 kTestEnvironment.setExpectedExecutions(1); in testUpdateEstimatedNetworkBytes()
57 kTestEnvironment.setContinueAfterStart(); in testUpdateEstimatedNetworkBytes()
59 assertTrue("Job didn't start", kTestEnvironment.awaitExecution()); in testUpdateEstimatedNetworkBytes()
64 kTestEnvironment.setEstimatedNetworkBytes(5, 10); in testUpdateEstimatedNetworkBytes()
79 kTestEnvironment.setExpectedExecutions(1); in testUpdateTransferredNetworkBytes()
80 kTestEnvironment.setContinueAfterStart(); in testUpdateTransferredNetworkBytes()
82 assertTrue("Job didn't start", kTestEnvironment.awaitExecution()); in testUpdateTransferredNetworkBytes()
87 kTestEnvironment.setTransferredNetworkBytes(5, 10); in testUpdateTransferredNetworkBytes()
DNotificationTest.java92 kTestEnvironment.setExpectedExecutions(1); in testNotificationJobEndDetach()
93 kTestEnvironment.setContinueAfterStart(); in testNotificationJobEndDetach()
94 kTestEnvironment.setNotificationAtStart(notificationId, notification, in testNotificationJobEndDetach()
97 assertTrue("Job didn't start", kTestEnvironment.awaitExecution()); in testNotificationJobEndDetach()
107 kTestEnvironment.setExpectedStopped(); in testNotificationJobEndDetach()
109 assertTrue(kTestEnvironment.awaitStopped()); in testNotificationJobEndDetach()
129 kTestEnvironment.setExpectedExecutions(1); in testNotificationJobEndRemove()
130 kTestEnvironment.setContinueAfterStart(); in testNotificationJobEndRemove()
131 kTestEnvironment.setNotificationAtStart(notificationId, notification, in testNotificationJobEndRemove()
134 assertTrue("Job didn't start", kTestEnvironment.awaitExecution()); in testNotificationJobEndRemove()
[all …]
DJobWorkItemTest.java53 kTestEnvironment.setExpectedExecutions(1); in testAllInfoGivenToJob()
54 kTestEnvironment.setExpectedWork(new MockJobService.TestWorkItem[]{ in testAllInfoGivenToJob()
56 kTestEnvironment.readyToWork(); in testAllInfoGivenToJob()
59 assertTrue("Job didn't fire immediately", kTestEnvironment.awaitExecution()); in testAllInfoGivenToJob()
62 List<JobWorkItem> executedJwis = kTestEnvironment.getLastReceivedWork(); in testAllInfoGivenToJob()
276 kTestEnvironment.setExpectedExecutions(1); in testDeliveryCountBumped()
277 kTestEnvironment.setExpectedWork(new MockJobService.TestWorkItem[]{ in testDeliveryCountBumped()
279 kTestEnvironment.readyToWork(); in testDeliveryCountBumped()
282 assertTrue("Job didn't fire immediately", kTestEnvironment.awaitExecution()); in testDeliveryCountBumped()
284 List<JobWorkItem> executedJWIs = kTestEnvironment.getLastReceivedWork(); in testDeliveryCountBumped()
DJobSchedulingTest.java140 kTestEnvironment.setExpectedExecutions(1); in testCancel_runningJob()
141 kTestEnvironment.setContinueAfterStart(); in testCancel_runningJob()
142 kTestEnvironment.setExpectedStopped(); in testCancel_runningJob()
143 kTestEnvironment.setRequestReschedule(); in testCancel_runningJob()
145 assertTrue("Job didn't start", kTestEnvironment.awaitExecution()); in testCancel_runningJob()
148 assertTrue("Job didn't start", kTestEnvironment.awaitStopped()); in testCancel_runningJob()
264 kTestEnvironment.setExpectedExecutions(1 + numMinPriorityJobs);
280 kTestEnvironment.awaitExecution();
284 List<Event> executedEvents = kTestEnvironment.getExecutedEvents();
472 kTestEnvironment.setExpectedExecutions(1);
[all …]
DBaseJobSchedulerTest.java63 static MockJobService.TestEnvironment kTestEnvironment = field in BaseJobSchedulerTest
142 kTestEnvironment.setUp(); in setUp()
/cts/tests/JobSchedulerSharedUid/src/android/jobscheduler/cts/shareduidtests/
DEnqueueJobWorkTest.java111 kTestEnvironment.setExpectedExecutions(1); in testEnqueueOneWork()
112 kTestEnvironment.setExpectedWork(work); in testEnqueueOneWork()
114 kTestEnvironment.readyToWork(); in testEnqueueOneWork()
117 kTestEnvironment.awaitExecution()); in testEnqueueOneWork()
118 compareWork(work, kTestEnvironment.getLastReceivedWork()); in testEnqueueOneWork()
119 if (kTestEnvironment.getLastErrorMessage() != null) { in testEnqueueOneWork()
120 fail(kTestEnvironment.getLastErrorMessage()); in testEnqueueOneWork()
140 kTestEnvironment.setExpectedExecutions(1); in testEnqueueMultipleWork()
141 kTestEnvironment.setExpectedWork(work); in testEnqueueMultipleWork()
151 kTestEnvironment.readyToWork(); in testEnqueueMultipleWork()
[all …]
DClipDataJobTest.java74 kTestEnvironment.setExpectedExecutions(1); in testClipDataGrant()
91 kTestEnvironment.awaitExecution()); in testClipDataGrant()
94 assertEquals(PackageManager.PERMISSION_GRANTED, kTestEnvironment.getLastPermCheckRead()); in testClipDataGrant()
95 assertEquals(PackageManager.PERMISSION_GRANTED, kTestEnvironment.getLastPermCheckWrite()); in testClipDataGrant()
132 kTestEnvironment.setExpectedExecutions(1); in testClipDataGrantReschedule()
151 kTestEnvironment.awaitExecution()); in testClipDataGrantReschedule()
154 assertEquals(PackageManager.PERMISSION_GRANTED, kTestEnvironment.getLastPermCheckRead()); in testClipDataGrantReschedule()
155 assertEquals(PackageManager.PERMISSION_GRANTED, kTestEnvironment.getLastPermCheckWrite()); in testClipDataGrantReschedule()
DConstraintTest.java50 static MockJobService.TestEnvironment kTestEnvironment = field in ConstraintTest
109 kTestEnvironment.setUp(); in setUp()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/intents/
DCameraContentJobService.java66 private static TestEnvironment kTestEnvironment; field in CameraContentJobService.TestEnvironment
73 if (kTestEnvironment == null) { in getTestEnvironment()
74 kTestEnvironment = new TestEnvironment(); in getTestEnvironment()
76 return kTestEnvironment; in getTestEnvironment()
/cts/tests/JobScheduler/src/android/jobscheduler/
DTriggerContentJobService.java107 private static TestEnvironment kTestEnvironment; field in TriggerContentJobService.TestEnvironment
120 if (kTestEnvironment == null) { in getTestEnvironment()
121 kTestEnvironment = new TestEnvironment(); in getTestEnvironment()
123 return kTestEnvironment; in getTestEnvironment()
DMockJobService.java433 private static TestEnvironment kTestEnvironment; field in MockJobService.TestEnvironment
459 if (kTestEnvironment == null) { in getTestEnvironment()
460 kTestEnvironment = new TestEnvironment(); in getTestEnvironment()
462 return kTestEnvironment; in getTestEnvironment()
/cts/tests/JobSchedulerSharedUid/src/android/jobscheduler/
DTriggerContentJobService.java107 private static TestEnvironment kTestEnvironment; field in TriggerContentJobService.TestEnvironment
120 if (kTestEnvironment == null) { in getTestEnvironment()
121 kTestEnvironment = new TestEnvironment(); in getTestEnvironment()
123 return kTestEnvironment; in getTestEnvironment()
DMockJobService.java368 private static TestEnvironment kTestEnvironment; field in MockJobService.TestEnvironment
385 if (kTestEnvironment == null) { in getTestEnvironment()
386 kTestEnvironment = new TestEnvironment(); in getTestEnvironment()
388 return kTestEnvironment; in getTestEnvironment()