/frameworks/base/packages/SettingsLib/DataStore/tests/src/com/android/settingslib/datastore/ |
D | ObserverTest.kt | 35 private val observer2 = mock<Observer>() constant in com.android.settingslib.datastore.ObserverTest 76 observable.addObserver(observer2, executor2) in addObserver_notifyObservers_removeObserver() 81 verify(observer2).onChanged(DataChangeReason.DELETE) in addObserver_notifyObservers_removeObserver() 83 reset(observer1, observer2) in addObserver_notifyObservers_removeObserver() 84 observable.removeObserver(observer2) in addObserver_notifyObservers_removeObserver() 88 verify(observer2, never()).onChanged(DataChangeReason.UPDATE) in addObserver_notifyObservers_removeObserver()
|
D | KeyedObserverTest.kt | 35 private val observer2 = mock<KeyedObserver<Any?>>() in <lambda>() constant in com.android.settingslib.datastore.KeyedObserverTest 113 keyedObservable.addObserver(observer2, executor2) in <lambda>() 117 verify(observer2).onKeyChanged(null, DataChangeReason.UPDATE) in <lambda>() 119 reset(observer1, observer2) in <lambda>() 120 keyedObservable.removeObserver(observer2) in <lambda>() 124 verify(observer2, never()).onKeyChanged(null, DataChangeReason.DELETE) in <lambda>()
|
/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/ |
D | BatteryStatsTimeBaseTest.java | 86 BatteryStatsImpl.TimeBaseObs observer2 = Mockito.mock(BatteryStatsImpl.TimeBaseObs.class); in testRunning() local 91 tb.add(observer2); in testRunning() 94 Assert.assertTrue(tb.hasObserver(observer2)); in testRunning() 100 Assert.assertTrue(tb.hasObserver(observer2)); in testRunning() 125 Mockito.verify(observer2).onTimeStarted(14000, 100, 1000); in testRunning() 126 Mockito.verify(observer2, Mockito.never()).onTimeStopped(-1, -1, -1); in testRunning() 127 Mockito.verifyNoMoreInteractions(observer2); in testRunning() 130 Mockito.reset(observer2); in testRunning() 157 Mockito.verify(observer2).onTimeStopped(14002, 252, 1002); in testRunning() 158 Mockito.verify(observer2, Mockito.never()).onTimeStopped(-1, -1, -1); in testRunning() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ |
D | UidObserverControllerTest.java | 160 final IUidObserver observer2 = mock(IUidObserver.Stub.class); in testDispatchUidsChanged() local 161 registerObserver(observer2, in testDispatchUidsChanged() 170 verify(observer2).onUidStateChanged(TEST_UID1, PROCESS_STATE_TOP, in testDispatchUidsChanged() 172 verifyNoMoreInteractions(observer2); in testDispatchUidsChanged() 180 verifyNoMoreInteractions(observer2); in testDispatchUidsChanged() 185 verify(observer2).onUidStateChanged(TEST_UID1, PROCESS_STATE_RECEIVER, in testDispatchUidsChanged() 188 verifyNoMoreInteractions(observer2); in testDispatchUidsChanged() 193 verify(observer2).onUidStateChanged(TEST_UID1, PROCESS_STATE_RECEIVER, in testDispatchUidsChanged() 196 verifyNoMoreInteractions(observer2); in testDispatchUidsChanged() 203 verify(observer2).onUidStateChanged(TEST_UID1, PROCESS_STATE_TOP, in testDispatchUidsChanged() [all …]
|
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/ui/widgets/ |
D | CommunalAppWidgetHostTest.kt | 214 val observer2 = mock<CommunalAppWidgetHost.Observer>() in observer_multipleObservers() constant 216 underTest.addObserver(observer2) in observer_multipleObservers() 221 verify(observer2, never()).onHostStartListening() in observer_multipleObservers() 225 verify(observer2).onHostStartListening() in observer_multipleObservers() 234 verify(observer2).onHostStopListening() in observer_multipleObservers()
|
/frameworks/base/tests/PackageWatchdog/src/com/android/server/ |
D | PackageWatchdogTest.java | 231 TestObserver observer2 = new TestObserver(OBSERVER_NAME_2); in testRegistration_multiObservers() local 234 watchdog.startObservingHealth(observer2, Arrays.asList(APP_A, APP_B), SHORT_DURATION); in testRegistration_multiObservers() 243 assertThat(observer2.mHealthCheckFailedPackages).containsExactly(APP_A, APP_B); in testRegistration_multiObservers() 265 TestObserver observer2 = new TestObserver(OBSERVER_NAME_2); in testUnregistration_multiObservers() local 268 watchdog.startObservingHealth(observer2, Arrays.asList(APP_A), SHORT_DURATION); in testUnregistration_multiObservers() 269 watchdog.unregisterHealthObserver(observer2); in testUnregistration_multiObservers() 277 assertThat(observer2.mHealthCheckFailedPackages).isEmpty(); in testUnregistration_multiObservers() 299 TestObserver observer2 = new TestObserver(OBSERVER_NAME_2); in testExpiration_multiObservers() local 302 watchdog.startObservingHealth(observer2, Arrays.asList(APP_A), LONG_DURATION); in testExpiration_multiObservers() 311 assertThat(observer2.mHealthCheckFailedPackages).containsExactly(APP_A); in testExpiration_multiObservers() [all …]
|
/frameworks/base/libs/hwui/tests/unit/ |
D | FrameMetricsReporterTests.cpp | 198 auto observer2 = sp<TestFrameMetricsObserver>::make(hasPresentTime /*waitForPresentTime*/); in TEST() local 200 observer2->reportMetricsFrom(frameNumber + 10, surfaceControlId + 1); in TEST() 202 reporter->addObserver(observer2.get()); in TEST() 205 EXPECT_CALL(*observer2, notify).Times(0); in TEST() 209 EXPECT_CALL(*observer2, notify).Times(1); in TEST()
|