/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ |
D | StatusBarIconControllerTest.java | 23 import static org.mockito.Mockito.mock; 92 return StatusBarIconHolder.fromMobileIconState(mock(MobileIconState.class)); in holderForType() 95 return StatusBarIconHolder.fromWifiIconState(mock(WifiIconState.class)); in holderForType() 99 return StatusBarIconHolder.fromIcon(mock(StatusBarIcon.class)); in holderForType() 118 StatusBarIconView mock = mock(StatusBarIconView.class); in addIcon() local 119 mGroup.addView(mock, index); in addIcon() 121 return mock; in addIcon() 126 StatusBarWifiView mock = mock(StatusBarWifiView.class); in addSignalIcon() local 127 mGroup.addView(mock, index); in addSignalIcon() 128 return mock; in addSignalIcon() [all …]
|
D | NavigationBarFragmentTest.java | 27 import static org.mockito.Mockito.mock; 137 mSysuiContext.putComponent(StatusBar.class, mock(StatusBar.class)); in setupSysuiDependency() 138 mSysuiContext.putComponent(Recents.class, mock(Recents.class)); in setupSysuiDependency() 139 mSysuiContext.putComponent(Divider.class, mock(Divider.class)); in setupSysuiDependency() 146 mSysuiTestableContextExternal.putComponent(StatusBar.class, mock(StatusBar.class)); in setupSysuiDependency() 147 mSysuiTestableContextExternal.putComponent(Recents.class, mock(Recents.class)); in setupSysuiDependency() 148 mSysuiTestableContextExternal.putComponent(Divider.class, mock(Divider.class)); in setupSysuiDependency() 151 WindowManager windowManager = mock(WindowManager.class); in setupSysuiDependency() 210 mock(DeviceProvisionedController.class); in instantiate() 214 : mock(AccessibilityManagerWrapper.class), in instantiate() [all …]
|
D | StatusBarNotificationPresenterTest.java | 20 import static org.mockito.Mockito.mock; 63 private ShadeController mShadeController = mock(ShadeController.class); 73 StatusBarWindowView statusBarWindowView = mock(StatusBarWindowView.class); in setup() 76 mock(NotificationPanelView.class), mock(HeadsUpManagerPhone.class), in setup() 77 statusBarWindowView, mock(NotificationListContainerViewGroup.class), in setup() 78 mock(DozeScrimController.class), mock(ScrimController.class), in setup() 79 mock(ActivityLaunchAnimator.class), mock(DynamicPrivacyController.class), in setup() 80 mock(NotificationAlertingManager.class), in setup() 81 mock(NotificationRowBinderImpl.class)); in setup() 114 ActivatableNotificationView view = mock(ActivatableNotificationView.class); in onActivatedMetrics()
|
D | HeadsUpAppearanceControllerTest.java | 20 import static org.mockito.Mockito.mock; 53 mock(NotificationStackScrollLayout.class); 54 private final NotificationPanelView mPanelView = mock(NotificationPanelView.class); 55 private final DarkIconDispatcher mDarkIconDispatcher = mock(DarkIconDispatcher.class); 71 mHeadsUpStatusBarView = new HeadsUpStatusBarView(mContext, mock(View.class), in setUp() 72 mock(TextView.class)); in setUp() 73 mHeadsUpManager = mock(HeadsUpManagerPhone.class); in setUp() 75 mStatusbarStateController = mock(StatusBarStateController.class); in setUp() 76 mBypassController = mock(KeyguardBypassController.class); in setUp() 77 mWakeUpCoordinator = mock(NotificationWakeUpCoordinator.class); in setUp() [all …]
|
/frameworks/base/test-mock/api/ |
D | lint-baseline.txt | 2 ArrayReturn: android.test.mock.MockContentProvider#bulkInsert(android.net.Uri, android.content.Cont… 4 ArrayReturn: android.test.mock.MockResources#getTextArray(int): 8 MissingNullability: android.test.mock.MockApplication#onConfigurationChanged(android.content.res.Co… 10 MissingNullability: android.test.mock.MockContentProvider#attachInfo(android.content.Context, andro… 12 MissingNullability: android.test.mock.MockContentProvider#attachInfo(android.content.Context, andro… 14 MissingNullability: android.test.mock.MockContentProvider#bulkInsert(android.net.Uri, android.conte… 16 MissingNullability: android.test.mock.MockContentProvider#bulkInsert(android.net.Uri, android.conte… 18 MissingNullability: android.test.mock.MockContentProvider#getStreamTypes(android.net.Uri, String): 20 MissingNullability: android.test.mock.MockContentProvider#getStreamTypes(android.net.Uri, String) p… 22 MissingNullability: android.test.mock.MockContentProvider#getStreamTypes(android.net.Uri, String) p… [all …]
|
/frameworks/base/core/tests/coretests/src/android/widget/focus/ |
D | RequestFocusTest.java | 20 import static org.mockito.Mockito.mock; 135 CombinedListeners mock = mock(CombinedListeners.class); in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable() local 136 clearingFocusButton.setOnFocusChangeListener(mock); in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable() 137 gainingFocusButton.setOnFocusChangeListener(mock); in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable() 138 clearingFocusButton.getViewTreeObserver().addOnGlobalFocusChangeListener(mock); in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable() 144 InOrder inOrder = inOrder(mock); in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable() 145 inOrder.verify(mock).onFocusChange(clearingFocusButton, false); in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable() 146 inOrder.verify(mock).onGlobalFocusChanged(clearingFocusButton, gainingFocusButton); in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable() 147 inOrder.verify(mock).onFocusChange(gainingFocusButton, true); in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable() 178 CombinedListeners mock = mock(CombinedListeners.class); in testOnFocusChangeCallbackOrderWhenClearingFocusOfNotFirstFocusable() local [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/ |
D | LocalMediaManagerTest.java | 23 import static org.mockito.Mockito.mock; 88 final MediaDevice device = mock(MediaDevice.class); in startScan_mediaDevicesListShouldBeClear() 98 final MediaDevice currentDevice = mock(MediaDevice.class); in connectDevice_deviceNotEqualCurrentConnectedDevice_connectDevice() 99 final MediaDevice device = mock(MediaDevice.class); in connectDevice_deviceNotEqualCurrentConnectedDevice_connectDevice() 118 final MediaDevice device = mock(BluetoothMediaDevice.class); in connectDevice_bluetoothDeviceNotConnected_connectBluetoothDevice() 119 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in connectDevice_bluetoothDeviceNotConnected_connectBluetoothDevice() 135 final MediaDevice device1 = mock(MediaDevice.class); in getMediaDeviceById_idExist_shouldReturnMediaDevice() 136 final MediaDevice device2 = mock(MediaDevice.class); in getMediaDeviceById_idExist_shouldReturnMediaDevice() 151 final MediaDevice device1 = mock(MediaDevice.class); in getMediaDeviceById_idNotExist_shouldReturnNull() 152 final MediaDevice device2 = mock(MediaDevice.class); in getMediaDeviceById_idNotExist_shouldReturnNull() [all …]
|
D | BluetoothMediaManagerTest.java | 22 import static org.mockito.Mockito.mock; 92 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in startScan_haveA2dpProfileDeviceIsPreferredAndBonded_shouldAddDevice() 93 final BluetoothDevice bluetoothDevice = mock(BluetoothDevice.class); in startScan_haveA2dpProfileDeviceIsPreferredAndBonded_shouldAddDevice() 109 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in startScan_haveA2dpProfileDeviceIsPreferredAndBondNone_shouldNotAddDevice() 110 final BluetoothDevice bluetoothDevice = mock(BluetoothDevice.class); in startScan_haveA2dpProfileDeviceIsPreferredAndBondNone_shouldNotAddDevice() 137 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in startScan_haveHapProfileDeviceIsPreferredAndBonded_shouldAddDevice() 138 final BluetoothDevice bluetoothDevice = mock(BluetoothDevice.class); in startScan_haveHapProfileDeviceIsPreferredAndBonded_shouldAddDevice() 165 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in starScan_a2dpAndHapProfileNotReady_shouldRegisterCallback() 180 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in starScan_a2dpAndHapProfileReady_shouldNotRegisterCallback() 195 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in onServiceConnected_a2dpAndHapProfileNotReady_doNothing() [all …]
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/utils/ |
D | MockTracker.java | 26 import org.mockito.mock.MockCreationSettings; 63 public void onMockCreated(Object mock, MockCreationSettings settings) { in onMockCreated() argument 64 mMocks.put(mock, null); in onMockCreated() 65 clearSpiedInstanceIfNeeded(mock, settings); in onMockCreated() 70 private void clearSpiedInstanceIfNeeded(Object mock, MockCreationSettings settings) { in clearSpiedInstanceIfNeeded() argument 71 if (mock != settings.getSpiedInstance()) { in clearSpiedInstanceIfNeeded() 80 Log.d(TAG, "Setting spiedInstance for " + mock + " to null."); in clearSpiedInstanceIfNeeded() 90 for (final Object mock : mMocks.keySet()) { in close() 91 if (MockUtil.isMock(mock)) { in close() 92 Mockito.reset(mock); in close()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/ |
D | MockSystemServices.java | 22 import static org.mockito.Mockito.mock; 58 import android.test.mock.MockContentProvider; 59 import android.test.mock.MockContentResolver; 120 environment = mock(EnvironmentForMock.class); in MockSystemServices() 121 systemProperties = mock(SystemPropertiesForMock.class); in MockSystemServices() 122 userManager = mock(UserManager.class); in MockSystemServices() 123 userManagerInternal = mock(UserManagerInternal.class); in MockSystemServices() 124 usageStatsManagerInternal = mock(UsageStatsManagerInternal.class); in MockSystemServices() 125 networkPolicyManagerInternal = mock(NetworkPolicyManagerInternal.class); in MockSystemServices() 127 userManagerForMock = mock(UserManagerForMock.class); in MockSystemServices() [all …]
|
/frameworks/native/services/surfaceflinger/tests/unittests/ |
D | Android.bp | 54 "mock/DisplayHardware/MockComposer.cpp", 55 "mock/DisplayHardware/MockDisplay.cpp", 56 "mock/DisplayHardware/MockPowerAdvisor.cpp", 57 "mock/gui/MockGraphicBufferConsumer.cpp", 58 "mock/gui/MockGraphicBufferProducer.cpp", 59 "mock/MockDispSync.cpp", 60 "mock/MockEventControlThread.cpp", 61 "mock/MockEventThread.cpp", 62 "mock/MockMessageQueue.cpp", 63 "mock/MockNativeWindowSurface.cpp", [all …]
|
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ |
D | RoleObserverTest.java | 29 import static org.mockito.Mockito.mock; 121 LocalServices.addService(WindowManagerInternal.class, mock(WindowManagerInternal.class)); in setUp() 122 mContext.addMockSystemService(AppOpsManager.class, mock(AppOpsManager.class)); in setUp() 133 mService.init(mock(Looper.class), in setUp() 134 mock(IPackageManager.class), mock(PackageManager.class), in setUp() 135 mock(LightsManager.class), in setUp() 136 mock(NotificationListeners.class), mock(NotificationAssistants.class), in setUp() 137 mock(ConditionProviders.class), mock(ICompanionDeviceManager.class), in setUp() 138 mock(SnoozeHelper.class), mock(NotificationUsageStats.class), in setUp() 139 mock(AtomicFile.class), mock(ActivityManager.class), in setUp() [all …]
|
D | NotificationTest.java | 26 import static org.mockito.Mockito.mock; 228 Bitmap bitA = mock(Bitmap.class); in testBigPictureChange() 230 Bitmap bitB = mock(Bitmap.class); in testBigPictureChange() 246 "a", 100, mock(Person.class)))); in testMessagingChange_text() 250 "a", 100, mock(Person.class))) in testMessagingChange_text() 252 "b", 100, mock(Person.class))) in testMessagingChange_text() 263 "a", 100, mock(Person.class)) in testMessagingChange_data() 264 .setData("text", mock(Uri.class)))); in testMessagingChange_data() 268 "a", 100, mock(Person.class)))); in testMessagingChange_data() 275 Person a = mock(Person.class); in testMessagingChange_sender() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/ |
D | KeyguardClockSwitchTest.java | 25 import static org.mockito.Mockito.mock; 86 when(mClockView.getPaint()).thenReturn(mock(TextPaint.class)); in setUp() 92 ClockPlugin plugin = mock(ClockPlugin.class); in onPluginConnected_showPluginClock() 108 ClockPlugin plugin = mock(ClockPlugin.class); in onPluginConnected_showPluginBigClock() 122 ClockPlugin plugin = mock(ClockPlugin.class); in onPluginConnected_nullView() 130 ClockPlugin plugin1 = mock(ClockPlugin.class); in onPluginConnected_showSecondPluginClock() 134 ClockPlugin plugin2 = mock(ClockPlugin.class); in onPluginConnected_showSecondPluginClock() 147 ClockPlugin plugin = mock(ClockPlugin.class); in onPluginConnected_darkAmountInitialized() 155 ClockPlugin plugin = mock(ClockPlugin.class); in onPluginDisconnected_showDefaultClock() 174 ClockPlugin plugin = mock(ClockPlugin.class); in onPluginDisconnected_hidePluginBigClock() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/ |
D | StatusBarIconListTest.java | 9 import static org.mockito.Mockito.mock; 53 StatusBarIconHolder sbHolder = mock(StatusBarIconHolder.class); in testAddSlotSlidesIcons() 63 StatusBarIconHolder sbHolderA = mock(StatusBarIconHolder.class); in testGetAndSetIcon() 64 StatusBarIconHolder sbHolderB = mock(StatusBarIconHolder.class); in testGetAndSetIcon() 75 StatusBarIconHolder sbHolderA = mock(StatusBarIconHolder.class); in testRemoveIcon() 76 StatusBarIconHolder sbHolderB = mock(StatusBarIconHolder.class); in testRemoveIcon() 86 StatusBarIconHolder sbHolder = mock(StatusBarIconHolder.class); in testGetViewIndex_NoMultiples() 100 StatusBarIconHolder sbHolder = mock(StatusBarIconHolder.class); in testGetViewIndex_MultipleIconsPerSlot() 106 StatusBarIconHolder sbHolder2 = mock(StatusBarIconHolder.class); in testGetViewIndex_MultipleIconsPerSlot() 107 StatusBarIconHolder sbHolder3 = mock(StatusBarIconHolder.class); in testGetViewIndex_MultipleIconsPerSlot() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ |
D | BluetoothControllerImplTest.java | 22 import static org.mockito.Mockito.mock; 71 mMockDeviceManager = mock(CachedBluetoothDeviceManager.class); in setup() 74 mMockAdapter = mock(LocalBluetoothAdapter.class); in setup() 76 when(mMockBluetoothManager.getEventManager()).thenReturn(mock(BluetoothEventManager.class)); in setup() 78 .thenReturn(mock(LocalBluetoothProfileManager.class)); in setup() 87 CachedBluetoothDevice device = mock(CachedBluetoothDevice.class); in testNoConnectionWithDevices() 100 CachedBluetoothDevice device = mock(CachedBluetoothDevice.class); in testDefaultConnectionState() 108 CachedBluetoothDevice device = mock(CachedBluetoothDevice.class); in testAsyncBondState() 110 BluetoothController.Callback callback = mock(BluetoothController.Callback.class); in testAsyncBondState() 129 CachedBluetoothDevice device = mock(CachedBluetoothDevice.class); in testAsyncConnectionState() [all …]
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | WindowProcessControllerMapTests.java | 19 import static com.android.dx.mockito.inline.extended.ExtendedMockito.mock; 64 UserHandle.getUserId(12345), mock(Object.class), mock(WindowProcessListener.class)); in setUp() 68 UserHandle.getUserId(12345), mock(Object.class), mock(WindowProcessListener.class)); in setUp() 72 UserHandle.getUserId(12345), mock(Object.class), mock(WindowProcessListener.class)); in setUp() 76 UserHandle.getUserId(12345), mock(Object.class), mock(WindowProcessListener.class)); in setUp() 80 UserHandle.getUserId(12345), mock(Object.class), mock(WindowProcessListener.class)); in setUp()
|
/frameworks/base/tests/testables/tests/src/android/testing/ |
D | TestableLooperTest.java | 22 import static org.mockito.Mockito.mock; 54 Runnable r = mock(Runnable.class); in testMessageExecuted() 65 Runnable r = mock(Runnable.class); in testMessageCallback() 66 MessageHandler messageHandler = mock(MessageHandler.class); in testMessageCallback() 84 Runnable r = mock(Runnable.class); in testProcessNumberOfMessages() 97 Runnable r = mock(Runnable.class); in testProcessAllMessages() 108 Runnable r = mock(Runnable.class); in test3Chain() 120 Runnable r = mock(Runnable.class); in testProcessAllMessages_2Messages() 121 Runnable r2 = mock(Runnable.class); in testProcessAllMessages_2Messages() 133 Runnable r = mock(Runnable.class); in testMainLooper() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/ |
D | QSFragmentTest.java | 19 import static org.mockito.Mockito.mock; 97 QSTileHost host = new QSTileHost(mContext, mock(StatusBarIconController.class), in testListening() 98 mock(QSFactoryImpl.class), new Handler(), Looper.myLooper(), in testListening() 99 mock(PluginManager.class), mock(TunerService.class), in testListening() 100 () -> mock(AutoTileManager.class), mock(DumpController.class)); in testListening() 140 new RemoteInputQuickSettingsDisabler(context, mock(ConfigurationController.class)), in instantiate() 143 mock(QSTileHost.class), in instantiate() 144 mock(StatusBarStateController.class)); in instantiate()
|
D | SlashImageViewTest.java | 21 import static org.mockito.Mockito.mock; 47 SlashState mockState = mock(SlashState.class); in testSetNonNullSlashStateCreatesSlashDrawable() 48 Drawable mockDrawable = mock(Drawable.class); in testSetNonNullSlashStateCreatesSlashDrawable() 59 SlashState mockState = mock(SlashState.class); in testSetNullSlashStateRemovesSlashDrawable() 60 Drawable mockDrawable = mock(Drawable.class); in testSetNullSlashStateRemovesSlashDrawable() 73 SlashState mockState = mock(SlashState.class); in testSetNullDrawableRemovesSlashDrawable() 74 Drawable mockDrawable = mock(Drawable.class); in testSetNullDrawableRemovesSlashDrawable() 87 Drawable mockDrawable = mock(Drawable.class); in testSetImageDrawableUsesDrawableLevel()
|
/frameworks/native/services/surfaceflinger/CompositionEngine/tests/ |
D | OutputTest.cpp | 53 StrictMock<mock::CompositionEngine> mCompositionEngine; 54 mock::DisplayColorProfile* mDisplayColorProfile = new StrictMock<mock::DisplayColorProfile>(); 55 mock::RenderSurface* mRenderSurface = new StrictMock<mock::RenderSurface>(); 237 mock::RenderSurface* renderSurface = new StrictMock<mock::RenderSurface>(); in TEST_F() 306 mock::OutputLayer* outputLayer1 = new StrictMock<mock::OutputLayer>(); in TEST_F() 307 mock::OutputLayer* outputLayer2 = new StrictMock<mock::OutputLayer>(); in TEST_F() 315 StrictMock<mock::Layer> layer; in TEST_F() 316 StrictMock<mock::Layer> otherLayer; in TEST_F() 338 mock::OutputLayer* existingOutputLayer = new StrictMock<mock::OutputLayer>(); in TEST_F() 345 std::shared_ptr<mock::Layer> layer{new StrictMock<mock::Layer>()}; in TEST_F() [all …]
|
/frameworks/base/core/tests/coretests/src/android/app/servertransaction/ |
D | ClientTransactionTests.java | 19 import static org.mockito.Mockito.mock; 49 ClientTransactionItem callback1 = mock(ClientTransactionItem.class); in testPreExecute() 50 ClientTransactionItem callback2 = mock(ClientTransactionItem.class); in testPreExecute() 51 ActivityLifecycleItem stateRequest = mock(ActivityLifecycleItem.class); in testPreExecute() 52 ClientTransactionHandler clientTransactionHandler = mock(ClientTransactionHandler.class); in testPreExecute() 53 IBinder token = mock(IBinder.class); in testPreExecute()
|
/frameworks/native/services/surfaceflinger/CompositionEngine/ |
D | Android.bp | 65 "mock/CompositionEngine.cpp", 66 "mock/Display.cpp", 67 "mock/DisplayColorProfile.cpp", 68 "mock/DisplaySurface.cpp", 69 "mock/Layer.cpp", 70 "mock/LayerFE.cpp", 71 "mock/NativeWindow.cpp", 72 "mock/Output.cpp", 73 "mock/OutputLayer.cpp", 74 "mock/RenderSurface.cpp",
|
/frameworks/base/tests/net/java/com/android/server/connectivity/ |
D | NetworkRankerTest.kt | 26 import org.mockito.Mockito.mock 35 private fun makeNai(satisfy: Boolean, score: Int) = mock(NetworkAgentInfo::class.java).also { in <lambda>() 45 val someRequest = mock(NetworkRequest::class.java) in testGetBestNetwork() 54 val someRequest = mock(NetworkRequest::class.java) in testIgnoreNonSatisfying() 61 val someRequest = mock(NetworkRequest::class.java) in testNoMatch() 67 val someRequest = mock(NetworkRequest::class.java) in testEmpty() 77 val someRequest = mock(NetworkRequest::class.java) in testStable()
|
/frameworks/base/test-mock/ |
D | Android.bp | 17 // Build the android.test.mock library 20 name: "android.test.mock", 25 // the android.test.mock package. They however provide private APIs that 26 // android.test.mock APIs references to. 27 ":framework-core-sources-for-test-mock", 37 "android.test.mock", 46 name: "android-test-mock-current.txt",
|