/frameworks/base/core/tests/coretests/src/android/widget/focus/ |
D | RequestFocusTest.java | 20 import static org.mockito.Mockito.mock; 133 CombinedListeners mock = mock(CombinedListeners.class); in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable() local 134 clearingFocusButton.setOnFocusChangeListener(mock); in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable() 135 gainingFocusButton.setOnFocusChangeListener(mock); in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable() 136 clearingFocusButton.getViewTreeObserver().addOnGlobalFocusChangeListener(mock); in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable() 142 InOrder inOrder = inOrder(mock); in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable() 143 inOrder.verify(mock).onFocusChange(clearingFocusButton, false); in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable() 144 inOrder.verify(mock).onGlobalFocusChanged(clearingFocusButton, gainingFocusButton); in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable() 145 inOrder.verify(mock).onFocusChange(gainingFocusButton, true); in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable() 176 CombinedListeners mock = mock(CombinedListeners.class); in testOnFocusChangeCallbackOrderWhenClearingFocusOfNotFirstFocusable() local [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/customize/ |
D | TileQueryHelperTest.java | 19 import static org.mockito.Mockito.mock; 54 QSTileHost mockHost = mock(QSTileHost.class); in testCompletionCalled() 55 TileAdapter mockAdapter = mock(TileAdapter.class); in testCompletionCalled() 56 Runnable mockCompletion = mock(Runnable.class); in testCompletionCalled() 64 QSTile mockTile = mock(QSTile.class); in testCompletionCalledAfterTilesFetched() 65 State mockState = mock(State.class); in testCompletionCalledAfterTilesFetched() 70 QSTileHost mockHost = mock(QSTileHost.class); in testCompletionCalledAfterTilesFetched() 77 TileAdapter mockAdapter = mock(TileAdapter.class); in testCompletionCalledAfterTilesFetched() 78 Runnable mockCompletion = mock(Runnable.class); in testCompletionCalledAfterTilesFetched()
|
/frameworks/support/emoji/core/tests/java/android/support/text/emoji/ |
D | InitCallbackTest.java | 20 import static org.mockito.Mockito.mock; 41 final EmojiCompat.InitCallback initCallback1 = mock(EmojiCompat.InitCallback.class); in testRegisterInitCallback_callsSuccessCallback() 42 final EmojiCompat.InitCallback initCallback2 = mock(EmojiCompat.InitCallback.class); in testRegisterInitCallback_callsSuccessCallback() 58 final EmojiCompat.InitCallback initCallback1 = mock(EmojiCompat.InitCallback.class); in testRegisterInitCallback_callsFailCallback() 59 final EmojiCompat.InitCallback initCallback2 = mock(EmojiCompat.InitCallback.class); in testRegisterInitCallback_callsFailCallback() 60 final EmojiCompat.MetadataLoader loader = mock(EmojiCompat.MetadataLoader.class); in testRegisterInitCallback_callsFailCallback() 78 final EmojiCompat.InitCallback initCallback = mock(EmojiCompat.InitCallback.class); in testRegisterInitCallback_callsFailCallback_whenOnFailCalledByLoader() 97 final EmojiCompat.InitCallback initCallback = mock(EmojiCompat.InitCallback.class); in testRegisterInitCallback_callsFailCallback_whenMetadataRepoIsNull() 118 final EmojiCompat.InitCallback callback = mock(EmojiCompat.InitCallback.class); in testUnregisterInitCallback_doesNotInteractWithCallback() 120 final EmojiCompat.InitCallback callbackUnregister = mock(EmojiCompat.InitCallback.class); in testUnregisterInitCallback_doesNotInteractWithCallback() [all …]
|
D | EmojiSpanTest.java | 22 import static org.mockito.Mockito.mock; 60 final TextPaint paint = mock(TextPaint.class); in testGetSize() 73 final EmojiMetadata metadata = mock(EmojiMetadata.class); in testGetSize() 88 final EmojiMetadata metadata = mock(EmojiMetadata.class); in testBackgroundIndicator() 93 final int spanWidth = span.getSize(mock(Paint.class), "", 0, 0, null); in testBackgroundIndicator() 95 final Canvas canvas = mock(Canvas.class); in testBackgroundIndicator() 103 span.draw(canvas, "a", 0 /*start*/, 1 /*end*/, x, top, y, bottom, mock(Paint.class)); in testBackgroundIndicator() 111 span.draw(canvas, "a", 0 /*start*/, 1 /*end*/, x, top, y, bottom, mock(Paint.class)); in testBackgroundIndicator()
|
/frameworks/base/tests/testables/tests/src/android/testing/ |
D | TestableLooperTest.java | 21 import static org.mockito.Mockito.mock; 51 Runnable r = mock(Runnable.class); in testMessageExecuted() 62 Runnable r = mock(Runnable.class); in testMessageCallback() 63 MessageHandler messageHandler = mock(MessageHandler.class); in testMessageCallback() 81 Runnable r = mock(Runnable.class); in testProcessNumberOfMessages() 94 Runnable r = mock(Runnable.class); in testProcessAllMessages() 105 Runnable r = mock(Runnable.class); in test3Chain() 117 Runnable r = mock(Runnable.class); in testProcessAllMessages_2Messages() 118 Runnable r2 = mock(Runnable.class); in testProcessAllMessages_2Messages() 130 Runnable r = mock(Runnable.class); in testMainLooper() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ |
D | BluetoothControllerImplTest.java | 19 import static org.mockito.Mockito.mock; 65 mMockDeviceManager = mock(CachedBluetoothDeviceManager.class); in setup() 68 mMockAdapter = mock(LocalBluetoothAdapter.class); in setup() 70 when(mMockBluetoothManager.getEventManager()).thenReturn(mock(BluetoothEventManager.class)); in setup() 78 CachedBluetoothDevice device = mock(CachedBluetoothDevice.class); in testNoConnectionWithDevices() 91 CachedBluetoothDevice device = mock(CachedBluetoothDevice.class); in testDefaultConnectionState() 99 CachedBluetoothDevice device = mock(CachedBluetoothDevice.class); in testAsyncBondState() 101 BluetoothController.Callback callback = mock(BluetoothController.Callback.class); in testAsyncBondState() 120 CachedBluetoothDevice device = mock(CachedBluetoothDevice.class); in testAsyncConnectionState() 122 BluetoothController.Callback callback = mock(BluetoothController.Callback.class); in testAsyncConnectionState()
|
D | NetworkControllerBaseTest.java | 64 import static org.mockito.Mockito.mock; 110 mMockWm = mock(WifiManager.class); in setUp() 111 mMockTm = mock(TelephonyManager.class); in setUp() 112 mMockSm = mock(SubscriptionManager.class); in setUp() 113 mMockCm = mock(ConnectivityManager.class); in setUp() 114 mMockSubDefaults = mock(SubscriptionDefaults.class); in setUp() 116 mMockNetworkScoreManager = mock(NetworkScoreManager.class); in setUp() 122 mSignalStrength = mock(SignalStrength.class); in setUp() 123 mServiceState = mock(ServiceState.class); in setUp() 127 mCallbackHandler = mock(CallbackHandler.class); in setUp() [all …]
|
/frameworks/base/core/tests/coretests/src/android/net/ |
D | SSLSessionCacheTest.java | 42 final SSLClientSessionCache mock = Mockito.mock(SSLClientSessionCache.class); in testInstall_compatibleContext() local 46 SSLSessionCache.install(new SSLSessionCache(mock), ctx); in testInstall_compatibleContext() 48 Mockito.verify(mock).getSessionData(Mockito.anyString(), Mockito.anyInt()); in testInstall_compatibleContext() 53 Mockito.verifyNoMoreInteractions(mock); in testInstall_compatibleContext() 60 new SSLSessionCache(Mockito.mock(SSLClientSessionCache.class)), in testInstall_incompatibleContext() 105 return Mockito.mock(SSLSessionContext.class); in engineGetClientSessionContext()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/ |
D | StatusBarIconListTest.java | 6 import static org.mockito.Mockito.mock; 44 StatusBarIcon sbIcon = mock(StatusBarIcon.class); in testAddSlotSlidesIcons() 54 StatusBarIcon sbIconA = mock(StatusBarIcon.class); in testGetAndSetIcon() 55 StatusBarIcon sbIconB = mock(StatusBarIcon.class); in testGetAndSetIcon() 66 StatusBarIcon sbIconA = mock(StatusBarIcon.class); in testRemoveIcon() 67 StatusBarIcon sbIconB = mock(StatusBarIcon.class); in testRemoveIcon() 77 StatusBarIcon sbIcon = mock(StatusBarIcon.class); in testGetViewIndex()
|
D | NotificationDataTest.java | 22 import static org.mockito.Mockito.mock; 53 mock(StatusBarNotification.class); 55 private final IPackageManager mMockPackageManager = mock(IPackageManager.class); 72 NotificationData.Environment mock = mock(NotificationData.Environment.class); in setUp() local 73 when(mock.getGroupManager()).thenReturn(new NotificationGroupManager()); in setUp() 74 mNotificationData = new TestableNotificationData(mock); in setUp() 75 mNotificationData.updateRanking(mock(NotificationListenerService.RankingMap.class)); in setUp()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/ |
D | TestableDependency.java | 17 import static org.mockito.Mockito.mock; 34 final T mock = mock(cls); in injectMockDependency() local 35 injectTestDependency(cls, mock); in injectMockDependency() 36 return mock; in injectMockDependency()
|
D | DependencyTest.java | 20 import static org.mockito.Mockito.mock; 43 FlashlightController f = mock(FlashlightController.class); in testClassDependency() 57 Dumpable d = mock(Dumpable.class); in testDump() 60 mDependency.dump(null, mock(PrintWriter.class), null); in testDump() 66 ConfigurationChangedReceiver d = mock(ConfigurationChangedReceiver.class); in testConfigurationChanged()
|
/frameworks/support/emoji/core/tests/java/android/support/text/emoji/widget/ |
D | EmojiEditTextHelperTest.java | 23 import static org.mockito.Mockito.mock; 53 EmojiCompat.reset(mock(EmojiCompat.class)); in setup() 66 mock(KeyListener.class)); in testGetKeyListener_returnsEmojiKeyListener() 73 KeyListener mockKeyListener = mock(KeyListener.class); in testGetKeyListener_doesNotCreateNewInstance() 87 mock(InputConnection.class), null); in testGetOnCreateInputConnection_returnsEmojiInputConnection() 95 mock(InputConnection.class), null); in testGetOnCreateInputConnection_doesNotCreateNewInstance() 103 mEditText = mock(EditText.class); in testAttachesTextWatcher() 115 mEditText = mock(EditText.class); in testSetMaxCount()
|
D | EmojiEditTextHelperPre19Test.java | 21 import static org.mockito.Mockito.mock; 46 final EditText editText = mock(EditText.class); in setup() 53 final KeyListener param = mock(KeyListener.class); in testGetKeyListener_returnsSameKeyListener() 62 final InputConnection param = mock(InputConnection.class); in testGetOnCreateInputConnection_returnsSameInputConnection() 71 final EditText editText = mock(EditText.class); in testDoesNotAttachTextWatcher()
|
/frameworks/base/tests/TtsTests/src/com/android/speech/tts/ |
D | TextToSpeechTests.java | 46 IDelegate passThrough = Mockito.mock(IDelegate.class); in setUp() 77 IDelegate delegate = Mockito.mock(IDelegate.class); in testSetLanguage_delegation() 95 IDelegate delegate = Mockito.mock(IDelegate.class); in testSetLanguage_availableLanguage() 121 IDelegate delegate = Mockito.mock(IDelegate.class); in testSetLanguage_unavailableLanguage() 145 IDelegate delegate = Mockito.mock(IDelegate.class); in testIsLanguageAvailable() 158 IDelegate delegate = Mockito.mock(IDelegate.class); in testDefaultLanguage_setsVoiceName() 188 private void blockingCallSpeak(String speech, IDelegate mock) throws in blockingCallSpeak() argument 191 doCountDown(latch).when(mock).onSynthesizeText(Mockito.<SynthesisRequest>anyObject(), in blockingCallSpeak() 200 TextToSpeech.OnInitListener listener = Mockito.mock( in blockingInitAndVerify() 220 public <T> T when(T mock) { in doCountDown() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/ |
D | DpmMockContext.java | 48 import android.test.mock.MockContentResolver; 49 import android.test.mock.MockContext; 71 import static org.mockito.Mockito.mock; 386 environment = mock(EnvironmentForMock.class); in DpmMockContext() 387 resources = mock(Resources.class); in DpmMockContext() 388 systemProperties = mock(SystemPropertiesForMock.class); in DpmMockContext() 389 userManager = mock(UserManager.class); in DpmMockContext() 390 userManagerInternal = mock(UserManagerInternal.class); in DpmMockContext() 391 userManagerForMock = mock(UserManagerForMock.class); in DpmMockContext() 392 packageManagerInternal = mock(PackageManagerInternal.class); in DpmMockContext() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | MockKeyStore.java | 5 import static org.mockito.Mockito.mock; 36 KeyStore mock = mock(KeyStore.class); in createMock() local 37 when(mock.state()).thenReturn(KeyStore.State.UNLOCKED); in createMock() 39 when(mock.put(anyString(), Matchers.any(byte[].class), anyInt(), anyInt())) in createMock() 50 when(mock.importKey(anyString(), Matchers.any(byte[].class), anyInt(), anyInt())) in createMock() 61 when(mock.delete(anyString(), anyInt())).thenAnswer(new Answer<Boolean>() { in createMock() 70 when(mock.contains(anyString(), anyInt())).thenAnswer(new Answer<Boolean>() { in createMock() 79 when(mock.duplicate(anyString(), anyInt(), anyString(), anyInt())) in createMock() 88 return mock; in createMock()
|
D | WificondControlTest.java | 26 import static org.mockito.Mockito.mock; 128 mWifiInjector = mock(WifiInjector.class); in setUp() 129 mWifiMonitor = mock(WifiMonitor.class); in setUp() 138 IWificond wificond = mock(IWificond.class); in testSetupDriverForClientMode() 177 IWificond wificond = mock(IWificond.class); in testSetupDriverForClientModeErrorWhenWificondFailedToSetupInterface() 191 IWificond wificond = mock(IWificond.class); in testSetupDriverForSoftApMode() 192 IApInterface apInterface = mock(IApInterface.class); in testSetupDriverForSoftApMode() 221 IWificond wificond = mock(IWificond.class); in testSetupDriverForSoftApModeErrorWhenWificondFailedToSetupInterface() 235 IWificond wificond = mock(IWificond.class); in testEnableSupplicant() 253 IWificond wificond = mock(IWificond.class); in testEnableSupplicantErrorWhenNoClientInterfaceConfigured() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ |
D | CollapsedStatusBarFragmentTest.java | 20 import static org.mockito.Mockito.mock; 55 mSysuiContext.putComponent(CommandQueue.class, mock(CommandQueue.class)); in setup() 56 mSysuiContext.putComponent(StatusBar.class, mock(StatusBar.class)); in setup() 57 mSysuiContext.putComponent(TunerService.class, mock(TunerService.class)); in setup() 59 mMockNotificiationAreaController = mock(NotificationIconAreaController.class); in setup() 60 mNotificationAreaInner = mock(View.class); in setup() 61 when(mNotificationAreaInner.animate()).thenReturn(mock(ViewPropertyAnimator.class)); in setup()
|
D | NavigationBarFragmentTest.java | 17 import static org.mockito.Mockito.mock; 59 mSysuiContext.putComponent(CommandQueue.class, mock(CommandQueue.class)); in setup() 60 mSysuiContext.putComponent(StatusBar.class, mock(StatusBar.class)); in setup() 61 mSysuiContext.putComponent(Recents.class, mock(Recents.class)); in setup() 62 mSysuiContext.putComponent(Divider.class, mock(Divider.class)); in setup() 64 WindowManager windowManager = mock(WindowManager.class); in setup()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/ |
D | TaskSnapshotSurfaceTest.java | 25 import static org.mockito.Mockito.mock; 77 final Canvas mockCanvas = mock(Canvas.class); in fillEmptyBackground_fillHorizontally() 87 final Canvas mockCanvas = mock(Canvas.class); in fillEmptyBackground_fillVertically() 97 final Canvas mockCanvas = mock(Canvas.class); in fillEmptyBackground_fillBoth() 108 final Canvas mockCanvas = mock(Canvas.class); in fillEmptyBackground_dontFill_sameSize() 118 final Canvas mockCanvas = mock(Canvas.class); in fillEmptyBackground_dontFill_bitmapLarger() 172 final Canvas mockCanvas = mock(Canvas.class); in testDrawStatusBarBackground() 185 final Canvas mockCanvas = mock(Canvas.class); in testDrawStatusBarBackground_nullFrame() 198 final Canvas mockCanvas = mock(Canvas.class); in testDrawStatusBarBackground_nope() 212 final Canvas mockCanvas = mock(Canvas.class); in testDrawNavigationBarBackground() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/tileimpl/ |
D | QSIconViewImplTest.java | 19 import static org.mockito.Mockito.mock; 55 ImageView iv = mock(ImageView.class); in testNoFirstAnimation() 60 s.icon = mock(Icon.class); in testNoFirstAnimation() 67 s.icon = mock(Icon.class); in testNoFirstAnimation() 68 when(iv.getDrawable()).thenReturn(mock(Drawable.class)); in testNoFirstAnimation() 76 ImageView iv = mock(ImageView.class); in testNoFirstFade()
|
/frameworks/support/design/tests/src/android/support/design/widget/ |
D | SnackbarTest.java | 35 import static org.mockito.Mockito.mock; 126 .setAction(ACTION_TEXT, mock(View.OnClickListener.class)), in testBasicContent() 132 .setAction(ACTION_ID, mock(View.OnClickListener.class)), in testBasicContent() 138 .setAction(ACTION_ID, mock(View.OnClickListener.class)), in testBasicContent() 147 mock(BaseTransientBottomBar.BaseCallback.class); in verifyDismissCallback() 149 .setAction(ACTION_TEXT, mock(View.OnClickListener.class)) in verifyDismissCallback() 308 final View.OnClickListener mockClickListener = mock(View.OnClickListener.class); in testActionClickListener() 325 .setAction(ACTION_TEXT, mock(View.OnClickListener.class)); in testSetCallback() 341 .setAction(ACTION_TEXT, mock(View.OnClickListener.class)); in testSingleCallback() 343 mock(BaseTransientBottomBar.BaseCallback.class); in testSingleCallback() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/ |
D | QSDetailTest.java | 22 import static org.mockito.Mockito.mock; 66 mQsPanel = mock(QSPanel.class); in setup() 67 mQuickHeader = mock(QuickStatusBarHeader.class); in setup() 68 mQsDetail.setQsPanel(mQsPanel, mQuickHeader, mock(View.class)); in setup() 70 mMockDetailAdapter = mock(DetailAdapter.class); in setup() 72 .thenReturn(mock(View.class)); in setup() 109 mQsDetail.setupDetailFooter(mock(DetailAdapter.class)); in testNullAdapterClick()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/ |
D | PreferenceControllerTest.java | 35 import static org.mockito.Mockito.mock; 102 final PreferenceManager preferenceManager = mock(PreferenceManager.class); in removePreference_shouldRemoveRecursively() 106 Preference pref1 = mock(Preference.class); in removePreference_shouldRemoveRecursively() 111 Preference pref3 = mock(Preference.class); in removePreference_shouldRemoveRecursively() 122 Preference pref21 = mock(Preference.class); in removePreference_shouldRemoveRecursively() 124 Preference pref22 = mock(Preference.class); in removePreference_shouldRemoveRecursively() 131 Preference pref42 = mock(Preference.class); in removePreference_shouldRemoveRecursively() 137 Preference pref411 = mock(Preference.class); in removePreference_shouldRemoveRecursively() 139 Preference pref412 = mock(Preference.class); in removePreference_shouldRemoveRecursively()
|