Searched refs:observer1 (Results 1 – 3 of 3) sorted by relevance
/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | BatteryStatsTimeBaseTest.java | 85 BatteryStatsImpl.TimeBaseObs observer1 = Mockito.mock(BatteryStatsImpl.TimeBaseObs.class); in testRunning() local 90 tb.add(observer1); in testRunning() 93 Assert.assertTrue(tb.hasObserver(observer1)); in testRunning() 99 Assert.assertTrue(tb.hasObserver(observer1)); in testRunning() 122 Mockito.verify(observer1).onTimeStarted(14000, 100, 1000); in testRunning() 123 Mockito.verify(observer1, Mockito.never()).onTimeStopped(-1, -1, -1); in testRunning() 124 Mockito.verifyNoMoreInteractions(observer1); in testRunning() 129 Mockito.reset(observer1); in testRunning() 154 Mockito.verify(observer1).onTimeStopped(14002, 252, 1002); in testRunning() 155 Mockito.verify(observer1, Mockito.never()).onTimeStopped(-1, -1, -1); in testRunning() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ |
D | UidObserverControllerTest.java | 151 final IUidObserver observer1 = mock(IUidObserver.Stub.class); in testDispatchUidsChanged() local 152 registerObserver(observer1, in testDispatchUidsChanged() 161 verify(observer1).onUidStateChanged(TEST_UID1, PROCESS_STATE_TOP, in testDispatchUidsChanged() 163 verify(observer1).onUidActive(TEST_UID1); in testDispatchUidsChanged() 164 verifyNoMoreInteractions(observer1); in testDispatchUidsChanged() 172 verify(observer1).onUidStateChanged(TEST_UID1, PROCESS_STATE_IMPORTANT_BACKGROUND, in testDispatchUidsChanged() 174 verifyNoMoreInteractions(observer1); in testDispatchUidsChanged() 182 verifyNoMoreInteractions(observer1); in testDispatchUidsChanged() 190 verifyNoMoreInteractions(observer1); in testDispatchUidsChanged() 193 unregisterObserver(observer1); in testDispatchUidsChanged() [all …]
|
/frameworks/base/tests/PackageWatchdog/src/com/android/server/ |
D | PackageWatchdogTest.java | 217 TestObserver observer1 = new TestObserver(OBSERVER_NAME_1); in testRegistration_multiObservers() local 220 watchdog.startObservingHealth(observer1, Arrays.asList(APP_A), SHORT_DURATION); in testRegistration_multiObservers() 229 assertThat(observer1.mHealthCheckFailedPackages).containsExactly(APP_A); in testRegistration_multiObservers() 251 TestObserver observer1 = new TestObserver(OBSERVER_NAME_1); in testUnregistration_multiObservers() local 254 watchdog.startObservingHealth(observer1, Arrays.asList(APP_A), SHORT_DURATION); in testUnregistration_multiObservers() 262 assertThat(observer1.mHealthCheckFailedPackages).containsExactly(APP_A); in testUnregistration_multiObservers() 285 TestObserver observer1 = new TestObserver(OBSERVER_NAME_1); in testExpiration_multiObservers() local 288 watchdog.startObservingHealth(observer1, Arrays.asList(APP_A), SHORT_DURATION); in testExpiration_multiObservers() 296 assertThat(observer1.mHealthCheckFailedPackages).isEmpty(); in testExpiration_multiObservers() 333 TestObserver observer1 = new TestObserver(OBSERVER_NAME_1); in testPersistence() local [all …]
|