/frameworks/native/services/inputflinger/tests/ |
D | InputTracingTest.cpp | 285 auto spy = sp<FakeWindowHandle>::make(APP, mDispatcher, "Spy", DISPLAY_ID); in TEST_F() local 286 spy->setSpy(true); in TEST_F() 287 spy->setTrustedOverlay(true); in TEST_F() 288 mDispatcher->onWindowInfosChanged({{*spy->getInfo(), *window->getInfo()}, {}, 0, 0}); in TEST_F() 291 tapAndExpect({spy, window}, Level::NONE, Level::NONE, s); in TEST_F() 294 spy->setSecure(true); in TEST_F() 295 mDispatcher->onWindowInfosChanged({{*spy->getInfo(), *window->getInfo()}, {}, 0, 0}); in TEST_F() 296 tapAndExpect({spy, window}, Level::COMPLETE, Level::COMPLETE, s); in TEST_F() 298 spy->setSecure(false); in TEST_F() 300 mDispatcher->onWindowInfosChanged({{*spy->getInfo(), *window->getInfo()}, {}, 0, 0}); in TEST_F() [all …]
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/am/ |
D | MockingOomAdjusterTests.java | 88 import static org.mockito.Mockito.spy; 193 mService.mAtmInternal = spy(mService.mActivityTaskManager.getAtmInternal()); in setUp() 199 ProcessList pr = spy(new ProcessList()); in setUp() 216 spy(new ActiveServices(mService))); in setUp() 337 ProcessRecord app = spy(makeDefaultProcessRecord(MOCKAPP_PID, MOCKAPP_UID, in testUpdateOomAdj_DoOne_Persistent_TopUi_Sleeping() 353 ProcessRecord app = spy(makeDefaultProcessRecord(MOCKAPP_PID, MOCKAPP_UID, in testUpdateOomAdj_DoOne_Persistent_TopUi_Awake() 367 ProcessRecord app = spy(makeDefaultProcessRecord(MOCKAPP_PID, MOCKAPP_UID, in testUpdateOomAdj_DoOne_Persistent_TopApp() 382 ProcessRecord app = spy(makeDefaultProcessRecord(MOCKAPP_PID, MOCKAPP_UID, in testUpdateOomAdj_DoOne_TopApp_Awake() 396 ProcessRecord app = spy(makeDefaultProcessRecord(MOCKAPP_PID, MOCKAPP_UID, in testUpdateOomAdj_DoOne_RunningAnimations() 410 ProcessRecord app = spy(makeDefaultProcessRecord(MOCKAPP_PID, MOCKAPP_UID, in testUpdateOomAdj_DoOne_RunningInstrumentation() [all …]
|
D | ServiceTimeoutTest.java | 31 import static org.mockito.Mockito.spy; 101 mProcessList = spy(new ProcessList()); in setUp() 113 realAms.mAtmInternal = spy(realAms.mActivityTaskManager.getAtmInternal()); in setUp() 114 realAms.mOomAdjuster.mCachedAppOptimizer = spy(realAms.mOomAdjuster.mCachedAppOptimizer); in setUp() 120 mAms = spy(realAms); in setUp() 152 final ServiceRecord sr = spy(ServiceRecord.newEmptyInstanceForTest(mAms)); in testServiceTimeoutAndProcessKill() 199 mActiveServices = spy(new ActiveServices(service)); in getActiveServices()
|
/frameworks/base/services/tests/powerservicetests/src/com/android/server/power/ |
D | WakeLockLogTest.java | 20 import static org.mockito.Mockito.spy; 63 TestInjector injectorSpy = spy(new TestInjector(tagDatabaseSize, logSize)); in testAddTwoItems_withNoEventTimeSupplied() 88 TestInjector injectorSpy = spy(new TestInjector(tagDatabaseSize, logSize)); in testAddTwoItems() 112 TestInjector injectorSpy = spy(new TestInjector(tagDatabaseSize, logSize)); in testAddTwoItemsWithTimeReset() 132 TestInjector injectorSpy = spy(new TestInjector(tagDatabaseSize, logSize)); in testAddTwoItemsWithTagOverwrite() 152 TestInjector injectorSpy = spy(new TestInjector(tagDatabaseSize, logSize)); in testAddFourItemsWithRingBufferOverflow() 201 TestInjector injectorSpy = spy(new TestInjector(tagDatabaseSize, logSize)); in testAddItemWithBadTag() 219 TestInjector injectorSpy = spy(new TestInjector(tagDatabaseSize, logSize)); in testAddItemWithReducedTagName() 238 TestInjector injectorSpy = spy(new TestInjector(tagDatabaseSize, logSize)); in testAddAcquireAndReleaseWithRepeatTagName() 258 TestInjector injectorSpy = spy(new TestInjector(tagDatabaseSize, logSize)); in testAddAcquireAndReleaseWithTimeTravel() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/wrapper/ |
D | NotificationTemplateViewWrapperTest.kt | 182 val spy = Mockito.spy(pi) in actionViewDetached_pendingIntentListenersDeregistered() constant 183 createActionWithPendingIntent(spy) in actionViewDetached_pendingIntentListenersDeregistered() 190 verify(spy, times(1)).registerCancelListener(captor.capture()) in actionViewDetached_pendingIntentListenersDeregistered() 191 verify(spy, times(1)).unregisterCancelListener(captor.value) in actionViewDetached_pendingIntentListenersDeregistered() 203 val spy = Mockito.spy(pi) in actionViewUpdated_oldPendingIntentListenersRemoved() constant 204 val action = createActionWithPendingIntent(spy) in actionViewUpdated_oldPendingIntentListenersRemoved() 211 Mockito.spy(action.getTag(com.android.systemui.res.R.id.pending_intent_listener_tag)) in actionViewUpdated_oldPendingIntentListenersRemoved() 229 verify(spy, times(1)).registerCancelListener(captor.capture()) in actionViewUpdated_oldPendingIntentListenersRemoved() 230 verify(spy, times(1)).unregisterCancelListener(captor.value) in actionViewUpdated_oldPendingIntentListenersRemoved()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ |
D | NotificationContentViewTest.kt | 57 import org.mockito.Mockito.spy in <lambda>() 81 spy(FrameLayout(mContext, /* attrs= */ null).also { it.visibility = View.GONE }) in <lambda>() 84 spy( in <lambda>() 305 expandedWrapper = spy(expandedWrapper) in <lambda>() 324 spy(NotificationHeaderView(mContext, /* attrs= */ null).apply { minimumHeight = height }) in <lambda>() 332 val mockContracted = spy(createViewWithHeight(contractedHeight)) in <lambda>() 335 val mockExpanded = spy(createViewWithHeight(expandedHeight)) in <lambda>() 339 val mockHeadsUp = spy(createViewWithHeight(contractedHeight)) in <lambda>() 361 val mockContracted = spy(createViewWithHeight(contractedHeight)) in <lambda>() 364 val mockExpanded = spy(createViewWithHeight(expandedHeight)) in <lambda>() [all …]
|
D | NotificationMenuRowTest.java | 154 NotificationMenuRow row = Mockito.spy( in testIsSnappedAndOnSameSide() 187 NotificationMenuRow row = Mockito.spy( in testGetMenuSnapTarget() 202 NotificationMenuRow row = Mockito.spy( in testIsSwipedEnoughToShowMenu() 229 NotificationMenuRow row = Mockito.spy( in testIsWithinSnapMenuThreshold() 263 NotificationMenuRow row = Mockito.spy( in testShouldSnapBack() 285 NotificationMenuRow row = Mockito.spy( in testCanBeDismissed() 301 NotificationMenuRow row = Mockito.spy( in testIsTowardsMenu() 322 NotificationMenuRow row = Mockito.spy( in onSnapBack() 344 NotificationMenuRow row = Mockito.spy( in testOnSnap() 365 NotificationMenuRow row = Mockito.spy( in testOnDismiss() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/companion/utils/ |
D | PackageUtilsTest.java | 22 import static org.mockito.Mockito.spy; 58 Context context = spy( in isAllowlisted_true() 61 final Resources res = spy(context.getResources()); in isAllowlisted_true() 82 Context context = spy( in isAllowlisted_package_disallowed() 85 final Resources res = spy(context.getResources()); in isAllowlisted_package_disallowed() 106 Context context = spy( in isAllowlisted_signature_mismatch() 109 final Resources res = spy(context.getResources()); in isAllowlisted_signature_mismatch()
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/location/gnss/hal/ |
D | GnssNativeTest.java | 22 import static org.mockito.Mockito.spy; 62 mGnssNative = spy(Objects.requireNonNull(GnssNative.create(injector, mMockConfiguration))); in setUp() 69 Executor executor = spy(Runnable::run); in testRequestPowerStats_onNull_executesCallbackWithNull() 70 GnssNative.PowerStatsCallback callback = spy(stats -> {}); in testRequestPowerStats_onNull_executesCallbackWithNull() 82 Executor executor = spy(Runnable::run); in testRequestPowerStats_onPowerStats_executesCallbackWithStats() 83 GnssNative.PowerStatsCallback callback = spy(stats -> {}); in testRequestPowerStats_onPowerStats_executesCallbackWithStats()
|
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/whitebalance/ |
D | AmbientLuxTest.java | 26 import static org.mockito.Mockito.spy; 102 mContextSpy = spy(new ContextWrapper(InstrumentationRegistry.getContext())); in setUp() 103 mResourcesSpy = spy(mContextSpy.getResources()); in setUp() 187 controller.mBrightnessFilter = spy(new AmbientFilterStubber()); in testNoSpline() 207 controller.mBrightnessFilter = spy(new AmbientFilterStubber()); in testSpline_OneSegment() 239 controller.mBrightnessFilter = spy(new AmbientFilterStubber()); in testSpline_TwoSegments() 276 controller.mBrightnessFilter = spy(new AmbientFilterStubber()); in testSpline_VerticalSegment() 295 controller.mBrightnessFilter = spy(new AmbientFilterStubber()); in testSpline_InvalidEndBias() 313 controller.mBrightnessFilter = spy(new AmbientFilterStubber()); in testSpline_InvalidBeginBias() 333 controller.mBrightnessFilter = spy(new AmbientFilterStubber()); in testSpline_OneSegmentHighLight() [all …]
|
/frameworks/base/core/tests/packagemonitortests/src/com/android/internal/content/ |
D | PackageMonitorTest.java | 25 import static org.mockito.Mockito.spy; 70 PackageMonitor spyPackageMonitor = spy(new TestPackageMonitor()); in testPackageMonitorMultipleRegisterThrowsException() 83 PackageMonitor spyPackageMonitor = spy(new TestPackageMonitor()); in testPackageMonitorRegisterMultipleUnRegisterThrowsException() 93 PackageMonitor spyPackageMonitor = spy(new TestPackageMonitor()); in testPackageMonitorNotRegisterUnRegisterThrowsException() 100 PackageMonitor spyPackageMonitor = spy(new TestPackageMonitor()); in testPackageMonitorNotRegisterWithoutSupportPackageRestartQuery() 110 PackageMonitor spyPackageMonitor = spy(new TestPackageMonitor(true)); in testPackageMonitorRegisterWithSupportPackageRestartQuery() 120 PackageMonitor spyPackageMonitor = spy(new TestPackageMonitor()); in testPackageMonitorDoHandlePackageEventUidRemoved() 134 PackageMonitor spyPackageMonitor = spy(new TestPackageMonitor()); in testPackageMonitorDoHandlePackageEventPackageSuspended() 150 PackageMonitor spyPackageMonitor = spy(new TestPackageMonitor()); in testPackageMonitorDoHandlePackageEventPackageUnSuspended() 167 PackageMonitor spyPackageMonitor = spy(new TestPackageMonitor()); in testPackageMonitorDoHandlePackageEventExternalApplicationAvailable() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/net/ |
D | NetworkCycleDataLoaderTest.java | 25 import static org.mockito.Mockito.spy; 85 mLoader = spy(new NetworkCycleDataTestLoader(mContext)); in loadInBackground_noNetworkPolicy_shouldLoad4WeeksData() 95 mLoader = spy(new NetworkCycleDataTestLoader(mContext)); in loadInBackground_hasNetworkPolicy_shouldLoadPolicyData() 105 mLoader = spy(new NetworkCycleDataTestLoader(mContext)); in loadInBackground_hasCyclePeriod_shouldLoadDataForSpecificCycles() 128 mLoader = spy(new NetworkCycleDataTestLoader(mContext)); in loadPolicyData_shouldRecordUsageFromPolicyCycle() 149 mLoader = spy(new NetworkCycleDataTestLoader(mContext)); in loadFourWeeksData_shouldRecordUsageForLast4Weeks() 162 mLoader = spy(new NetworkCycleDataTestLoader(mContext)); in loadDataForSpecificCycles_shouldRecordUsageForSpecifiedTime() 183 mLoader = spy(new NetworkCycleDataTestLoader(mContext)); in getTimeRangeOf()
|
D | NetworkCycleDataForUidLoaderTest.java | 26 import static org.mockito.Mockito.spy; 79 mLoader = spy(NetworkCycleDataForUidLoader.builder(mContext) in recordUsage_shouldQueryNetworkDetailsForUidAndForegroundState() 96 mLoader = spy(NetworkCycleDataForUidLoader.builder(mContext) in recordUsage_retrieveDetailIsFalse_shouldNotQueryNetworkForegroundState() 109 mLoader = spy(NetworkCycleDataForUidLoader.builder(mContext) in recordUsage_multipleUids_shouldQueryNetworkDetailsForEachUid()
|
/frameworks/base/core/tests/utiltests/src/android/util/ |
D | SystemConfigFileCommitEventLoggerTest.java | 20 import static org.mockito.Mockito.spy; 42 var logger = spy(new SystemConfigFileCommitEventLogger("name")); in testSimple() 53 var logger = spy(new SystemConfigFileCommitEventLogger("name")); in testMultipleWrong() 71 var logger = spy(new SystemConfigFileCommitEventLogger("name")); in testMultipleRight()
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/configupdate/ |
D | TelephonyConfigUpdateInstallReceiverTest.java | 35 import static org.mockito.Mockito.spy; 107 spy(new TelephonyConfigUpdateInstallReceiver()); in testPostInstall() 127 spy(new SatelliteConfigParser(mBytesProtoBuffer)); in testPostInstall() 129 ConcurrentHashMap<Executor, ConfigProviderAdaptor.Callback> spyCallbackHashMap = spy( in testPostInstall() 154 spy(new SatelliteConfigParser(mBytesProtoBuffer)); in testPostInstall() 177 spy(new SatelliteConfigParser(mBytesProtoBuffer)); in testPostInstall() 200 spy(new SatelliteConfigParser(mBytesProtoBuffer)); in testPostInstall() 224 spy(new SatelliteConfigParser(mBytesProtoBuffer)); in testPostInstall() 241 spy(new TelephonyConfigUpdateInstallReceiver()); in testGetConfig() 287 spy(new TelephonyConfigUpdateInstallReceiver()); in testIsValidSatelliteCarrierConfigData()
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | ActivityInterceptorCallbackRegistryTest.java | 26 import static org.mockito.Mockito.spy; 50 mRegistry = spy(ActivityInterceptorCallbackRegistry.getInstance()); in setUp() 57 ActivityInterceptorCallbackRegistry registry = spy( in registerActivityInterceptorCallbackFailIfNotSystemId() 103 ActivityInterceptorCallbackRegistry registry = spy( in unregisterActivityInterceptorCallbackFailIfNotSystemId()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/ |
D | RestrictedTopLevelPreferenceTest.java | 22 import static org.mockito.Mockito.spy; 45 mPreference = spy(new RestrictedTopLevelPreference(mContext)); in setUp() 46 mHelper = spy(new RestrictedPreferenceHelper(mContext, mPreference, null)); in setUp()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/globalactions/ |
D | GlobalActionsDialogLiteTest.java | 28 import static org.mockito.Mockito.spy; 226 mGlobalActionsDialogLite = spy(mGlobalActionsDialogLite); in testShouldLogClose_backButton() 245 mGlobalActionsDialogLite = spy(mGlobalActionsDialogLite); in testPredictiveBackCallbackRegisteredAndUnregistered() 275 mGlobalActionsDialogLite = spy(mGlobalActionsDialogLite); in testPredictiveBackInvocationDismissesDialog() 302 mGlobalActionsDialogLite = spy(mGlobalActionsDialogLite); in testSingleTap_logAndDismiss() 315 GestureDetector.SimpleOnGestureListener gestureListener = spy(dialog.mGestureListener); in testSingleTap_logAndDismiss() 322 mGlobalActionsDialogLite = spy(mGlobalActionsDialogLite); in testSwipeDownLockscreen_logAndOpenQS() 336 GestureDetector.SimpleOnGestureListener gestureListener = spy(dialog.mGestureListener); in testSwipeDownLockscreen_logAndOpenQS() 346 mGlobalActionsDialogLite = spy(mGlobalActionsDialogLite); in testSwipeDown_logAndOpenNotificationShade() 360 GestureDetector.SimpleOnGestureListener gestureListener = spy(dialog.mGestureListener); in testSwipeDown_logAndOpenNotificationShade() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/controls/controller/ |
D | ControlActionCoordinatorImplTest.kt | 44 import org.mockito.Mockito.spy 92 coordinator = spy(ControlActionCoordinatorImpl( in any() 109 action = spy(coordinator.Action(ID, {}, false, true)) in any() 145 action = spy(coordinator.Action(ID, {}, false, false)) in testToggleRunsWhenLockedAndAuthNotRequired() 158 action = spy(coordinator.Action(ID, {}, false, false)) in testToggleWhenLockedDoesNotTriggerDialog_featureFlagEnabled() 173 action = spy(coordinator.Action(ID, {}, false, true)) in testToggleDoesNotRunsWhenLockedAndAuthRequired()
|
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/model/ |
D | SysUiStateKosmos.kt | 22 import org.mockito.Mockito.spy 25 spy( in <lambda>()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/ |
D | AdaptiveIconTest.java | 26 import static org.mockito.Mockito.spy; 77 spy(new AdaptiveIcon(mContext, new ColorDrawable(Color.BLACK))); in setBackgroundColor_shouldUpdateColorFilter() 88 final Tile tile = spy(new ActivityTile(mActivityInfo, CategoryKey.CATEGORY_HOMEPAGE)); in setBackgroundColor_externalTileWithBackgroundColorRawValue_shouldUpdateIcon() 101 final Tile tile = spy(new ActivityTile(mActivityInfo, CategoryKey.CATEGORY_HOMEPAGE)); in setBackgroundColor_tileWithoutBackgroundColor_shouldSetDefaultBackgroundColor() 114 final Tile tile = spy(new ActivityTile(mActivityInfo, CategoryKey.CATEGORY_HOMEPAGE)); in onBindTile_externalTileWithBackgroundColorHint_shouldUpdateIcon()
|
D | FooterPreferenceTest.java | 21 import static org.mockito.Mockito.spy; 95 PreferenceViewHolder viewHolder = spy(PreferenceViewHolder.createInstanceForTests( in onBindViewHolder_whenTitleIsNull_shouldNotRaiseNpe() 111 PreferenceViewHolder viewHolder = spy(PreferenceViewHolder.createInstanceForTests( in onBindViewHolder_whenLearnMoreIsNull_shouldNotRaiseNpe() 127 PreferenceViewHolder viewHolder = spy(PreferenceViewHolder.createInstanceForTests( in onBindViewHolder_whenIconFrameIsNull_shouldNotRaiseNpe()
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/rollback/ |
D | RollbackPackageHealthObserverTest.java | 32 import static org.mockito.Mockito.spy; 168 spy(new RollbackPackageHealthObserver(mMockContext, mApexManager)); in testHealthCheckLevels() 212 spy(new RollbackPackageHealthObserver(mMockContext, mApexManager)); in testIsPersistent() 219 spy(new RollbackPackageHealthObserver(mMockContext, mApexManager)); in testMayObservePackage_withoutAnyRollback() 229 spy(new RollbackPackageHealthObserver(mMockContext, mApexManager)); in testMayObservePackage_forPersistentApp() 244 spy(new RollbackPackageHealthObserver(mMockContext, mApexManager)); in testMayObservePackage_forNonPersistentApp() 270 spy(new RollbackPackageHealthObserver(mMockContext, mApexManager)); in healthCheckFailed_impactLevelLow_onePackage() 301 spy(new RollbackPackageHealthObserver(mMockContext, mApexManager)); in healthCheckFailed_impactLevelHigh_onePackage() 332 spy(new RollbackPackageHealthObserver(mMockContext, mApexManager)); in healthCheckFailed_impactLevelManualOnly_onePackage() 370 spy(new RollbackPackageHealthObserver(mMockContext, mApexManager)); in healthCheckFailed_impactLevelLowAndHigh_onePackage() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/accessibility/floatingmenu/ |
D | DragToInteractAnimationControllerTest.java | 19 import static org.mockito.Mockito.spy; 70 final MenuView stubMenuView = spy(new MenuView(mContext, stubMenuViewModel, in setUp() 72 mInteractView = spy(new DragToInteractView(mContext)); in setUp() 73 mDismissView = spy(new DismissView(mContext)); in setUp()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/shared/clocks/ |
D | ClockRegistryTest.kt | 52 import org.mockito.Mockito.spy 220 val lifecycle1 = spy(FakeLifecycle("1", plugin1)) in clockIdConflict_ErrorWithoutCrash_unloadDuplicate() 225 val lifecycle2 = spy(FakeLifecycle("2", plugin2)) in clockIdConflict_ErrorWithoutCrash_unloadDuplicate() 252 val lifecycle1 = spy(FakeLifecycle("1", plugin1)) in createCurrentClock_pluginConnected() 257 val lifecycle2 = spy(FakeLifecycle("2", plugin2)) in createCurrentClock_pluginConnected() 272 val lifecycle1 = spy(FakeLifecycle("1", plugin1)) in activeClockId_changeAfterPluginConnected() 277 val lifecycle2 = spy(FakeLifecycle("2", plugin2)) in activeClockId_changeAfterPluginConnected() 293 val lifecycle1 = spy(FakeLifecycle("1", plugin1)) in createDefaultClock_pluginDisconnected() 298 val lifecycle2 = spy(FakeLifecycle("2", plugin2)) in createDefaultClock_pluginDisconnected() 314 val lifecycle1 = spy(FakeLifecycle("1", plugin1)) in pluginRemoved_clockAndListChanged() [all …]
|