/frameworks/native/services/surfaceflinger/tests/unittests/ |
D | RefreshRateStatsTest.cpp | 99 std::unordered_map<std::string, int64_t> times = mRefreshRateStats->getTotalTimes(); in TEST_F() local 100 ASSERT_EQ(1, times.size()); in TEST_F() 101 EXPECT_NE(0u, times.count("ScreenOff")); in TEST_F() 105 auto screenOff = times["ScreenOff"]; in TEST_F() 109 times = mRefreshRateStats->getTotalTimes(); in TEST_F() 110 EXPECT_LT(screenOff, times["ScreenOff"]); in TEST_F() 111 EXPECT_EQ(0u, times.count("90.00fps")); in TEST_F() 118 times = mRefreshRateStats->getTotalTimes(); in TEST_F() 119 EXPECT_EQ(screenOff, times["ScreenOff"]); in TEST_F() 120 ASSERT_EQ(1u, times.count("90.00fps")); in TEST_F() [all …]
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/ |
D | AppStateTrackerTest.java | 35 import static org.mockito.Mockito.times; 285 verify(mMockContext, times(2)).registerReceiver( in callStart() 932 verify(l, times(0)).updateAllJobs(); in assertNoCallbacks() 933 verify(l, times(0)).updateJobsForUid(anyInt(), anyBoolean()); in assertNoCallbacks() 934 verify(l, times(0)).updateJobsForUidPackage(anyInt(), anyString(), anyBoolean()); in assertNoCallbacks() 936 verify(l, times(0)).unblockAllUnrestrictedAlarms(); in assertNoCallbacks() 937 verify(l, times(0)).unblockAlarmsForUid(anyInt()); in assertNoCallbacks() 938 verify(l, times(0)).unblockAlarmsForUidPackage(anyInt(), anyString()); in assertNoCallbacks() 955 verify(l, times(1)).updateAllJobs(); in testPowerSaveListener() 956 verify(l, times(0)).updateJobsForUid(anyInt(), anyBoolean()); in testPowerSaveListener() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ |
D | NotificationSwipeHelperTest.java | 26 import static org.mockito.Mockito.times; 108 verify(mSwipeHelper, times(1)).setExposedMenuView(null); in testClearExposedMenuView() 124 verify(mSwipeHelper, times(1)).setTranslatingParentView(null); in testClearTranslatingParentView() 143 verify(mSwipeHelper, times(1)).setCurrentMenuRow(null); in testClearCurrentMenuRow() 156 verify(mSwipeHelper, times(1)).clearCurrentMenuRow(); in testOnDownUpdate_ExpandableNotificationRow() 157 verify(mHandler, times(1)).removeCallbacks(mFalsingCheck); in testOnDownUpdate_ExpandableNotificationRow() 158 verify(mSwipeHelper, times(1)).resetExposedMenuView(true, false); in testOnDownUpdate_ExpandableNotificationRow() 159 verify(mSwipeHelper, times(1)).initializeRow(mNotificationRow); in testOnDownUpdate_ExpandableNotificationRow() 172 verify(mSwipeHelper, times(1)).clearCurrentMenuRow(); in testOnDownUpdate_notExpandableNotificationRow() 173 verify(mHandler, times(1)).removeCallbacks(mFalsingCheck); in testOnDownUpdate_notExpandableNotificationRow() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/power/batterysaver/ |
D | FileUpdaterTest.java | 26 import static org.mockito.Mockito.times; 137 private void veriryWtf(int times) { in veriryWtf() argument 138 verify(mInjector, times(times)).injectWtf(anyOrNullString(), anyOrNull(Throwable.class)); in veriryWtf() 153 verify(mInjector, times(0)).injectWriteToFile(anyOrNullString(), anyOrNullString()); in testNoWrites() 159 verify(mInjector, times(0)).injectWriteToFile(anyOrNullString(), anyOrNullString()); in testNoWrites() 178 verify(mInjector, times(1)).injectWriteToFile("file1", "11"); in testSimpleWrite() 184 verify(mInjector, times(1)).injectWriteToFile("file1", "111"); in testSimpleWrite() 205 verify(mInjector, times(1)).injectWriteToFile("file1", "11"); in testMultiWrites() 206 verify(mInjector, times(1)).injectWriteToFile("file2", "22"); in testMultiWrites() 207 verify(mInjector, times(1)).injectWriteToFile("file3", "33"); in testMultiWrites() [all …]
|
/frameworks/base/core/tests/uwbtests/src/android/uwb/ |
D | RangingManagerTest.java | 23 import static org.mockito.Mockito.times; 60 verify(adapter, times(1)).openRanging( in testOpenSession_OpenRangingInvoked() 71 verify(callback, times(0)).onOpened(any()); in testOnRangingOpened_InvalidSessionHandle() 84 verify(adapter, times(1)).openRanging( in testOnRangingOpened_MultipleSessionsRegistered() 89 verify(adapter, times(2)).openRanging( in testOnRangingOpened_MultipleSessionsRegistered() 94 verify(callback1, times(1)).onOpened(any()); in testOnRangingOpened_MultipleSessionsRegistered() 95 verify(callback2, times(0)).onOpened(any()); in testOnRangingOpened_MultipleSessionsRegistered() 98 verify(callback1, times(1)).onOpened(any()); in testOnRangingOpened_MultipleSessionsRegistered() 99 verify(callback2, times(1)).onOpened(any()); in testOnRangingOpened_MultipleSessionsRegistered() 112 verify(adapter, times(1)).openRanging( in testCorrectCallbackInvoked() [all …]
|
/frameworks/base/core/tests/nfctests/src/android/nfc/ |
D | NfcControllerAlwaysOnListenerTest.java | 25 import static org.mockito.Mockito.times; 62 verify(listener, times(1)).onControllerAlwaysOnChanged(anyBoolean()); 76 verify(mNfcAdapter, times(0)).registerControllerAlwaysOnListener(any()); 80 verify(mNfcAdapter, times(0)).registerControllerAlwaysOnListener(any()); 84 verify(mNfcAdapter, times(0)).registerControllerAlwaysOnListener(any()); 85 verify(mNfcAdapter, times(0)).unregisterControllerAlwaysOnListener(any()); 89 verify(mNfcAdapter, times(0)).registerControllerAlwaysOnListener(any()); 90 verify(mNfcAdapter, times(0)).unregisterControllerAlwaysOnListener(any()); 103 verify(mNfcAdapter, times(1)).registerControllerAlwaysOnListener(any()); 107 verify(mNfcAdapter, times(1)).registerControllerAlwaysOnListener(any()); [all …]
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | SyncEngineTests.java | 21 import static com.android.dx.mockito.inline.extended.ExtendedMockito.times; 73 verify(mWm.mWindowPlacerLocked, times(1)).requestTraversal(); in testTrivialSyncCallback() 76 verify(listener, times(0)).onTransactionReady(anyInt(), any()); in testTrivialSyncCallback() 80 verify(mWm.mWindowPlacerLocked, times(2)).requestTraversal(); in testTrivialSyncCallback() 82 verify(listener, times(1)).onTransactionReady(eq(id), notNull()); in testTrivialSyncCallback() 86 verify(listener, times(1)).onTransactionReady(anyInt(), any()); in testTrivialSyncCallback() 102 verify(mWm.mWindowPlacerLocked, times(2)).requestTraversal(); in testWaitingSyncCallback() 104 verify(listener, times(0)).onTransactionReady(anyInt(), any()); in testWaitingSyncCallback() 108 verify(mWm.mWindowPlacerLocked, times(3)).requestTraversal(); in testWaitingSyncCallback() 110 verify(listener, times(1)).onTransactionReady(eq(id), notNull()); in testWaitingSyncCallback() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/transport/ |
D | DelegatingTransportTest.java | 21 import static org.mockito.Mockito.times; 78 verify(mBackupTransport, times(1)).name(); in testName() 90 verify(mBackupTransport, times(1)).configurationIntent(); in testConfigurationIntent() 102 verify(mBackupTransport, times(1)).currentDestinationString(); in testCurrentDestinationString() 114 verify(mBackupTransport, times(1)).dataManagementIntent(); in testDataManagementIntent() 126 verify(mBackupTransport, times(1)).dataManagementIntentLabel(); in testDataManagementIntentLabel() 138 verify(mBackupTransport, times(1)).transportDirName(); in testTransportDirName() 150 verify(mBackupTransport, times(1)).requestBackupTime(); in testRequestBackupTime() 162 verify(mBackupTransport, times(1)).initializeDevice(); in testInitializeDevice() 174 verify(mBackupTransport, times(1)).performBackup(mPackageInfo, mFd, mFlags); in testPerformBackup() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/model/ |
D | SysUiStateTest.java | 23 import static org.mockito.Mockito.times; 58 verify(mCallback, times(1)).onSystemUiStateChanged(FLAG_1); in addSingle_setFlag() 66 verify(mCallback, times(1)).onSystemUiStateChanged(FLAG_1); in addMultiple_setFlag() 67 verify(mCallback, times(1)) in addMultiple_setFlag() 78 verify(mCallback, times(1)).onSystemUiStateChanged(FLAG_1); in addMultipleRemoveOne_setFlag() 79 verify(mCallback, times(1)) in addMultipleRemoveOne_setFlag() 81 verify(mCallback, times(1)).onSystemUiStateChanged(FLAG_2); in addMultipleRemoveOne_setFlag() 89 verify(mCallback, times(1)).onSystemUiStateChanged(expected); in addMultiple_setFlags() 99 verify(mCallback, times(1)).onSystemUiStateChanged(expected1); in addMultipleRemoveOne_setFlags() 101 verify(mCallback, times(1)).onSystemUiStateChanged(expected2); in addMultipleRemoveOne_setFlags() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/navigationbar/ |
D | NavigationBarRotationContextTest.java | 22 import static org.mockito.Mockito.times; 78 verify(mRotationButtonController, times(1)).setRotateSuggestionButtonState( in testOnInvalidRotationProposal() 86 verify(mRotationButtonController, times(1)).setRotateSuggestionButtonState( in testOnSameRotationProposal() 96 verify(mRotationButtonController, times(0)).setRotateSuggestionButtonState( in testOnRotationProposalShowButtonShowNav() 98 verify(mRotationButtonController, times(0)).setRotateSuggestionButtonState( in testOnRotationProposalShowButtonShowNav() 104 verify(mRotationButtonController, times(0)).setRotateSuggestionButtonState( in testOnRotationProposalShowButtonShowNav() 106 verify(mRotationButtonController, times(0)).setRotateSuggestionButtonState( in testOnRotationProposalShowButtonShowNav() 111 verify(mRotationButtonController, times(1)).setRotateSuggestionButtonState( in testOnRotationProposalShowButtonShowNav() 119 verify(mRotationButtonController, times(0)).setRotateSuggestionButtonState( in testOnRotationProposalShowButton() 121 verify(mRotationButtonController, times(0)).setRotateSuggestionButtonState( in testOnRotationProposalShowButton() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | SubscriptionInfoUpdaterTest.java | 31 import static org.mockito.Mockito.times; 187 verify(mSubscriptionController, times(1)).clearSubInfoRecord(eq(FAKE_SUB_ID_1)); in testSimAbsent() 193 verify(mSubscriptionController, times(1)).notifySubscriptionInfoChanged(); in testSimAbsent() 207 verify(mSubscriptionController, times(1)).clearSubInfoRecord(eq(FAKE_SUB_ID_1)); in testSimAbsentAndInactive() 213 verify(mConfigManager, times(0)).updateConfigForPhoneId(eq(FAKE_SUB_ID_1), in testSimAbsentAndInactive() 215 verify(mContext, times(0)).sendBroadcast(any(), anyString()); in testSimAbsentAndInactive() 216 verify(mSubscriptionController, times(1)).notifySubscriptionInfoChanged(); in testSimAbsentAndInactive() 227 verify(mSubscriptionContent, times(0)).put(anyString(), any()); in testSimUnknown() 232 verify(mSubscriptionController, times(0)).clearSubInfo(); in testSimUnknown() 233 verify(mSubscriptionController, times(0)).notifySubscriptionInfoChanged(); in testSimUnknown() [all …]
|
D | CarrierActionAgentTest.java | 21 import static org.mockito.Mockito.times; 98 verify(mDataActionHandler, times(0)).sendMessageAtTime(message.capture(), anyLong()); in testCarrierActionResetOnAPM() 99 verify(mRadioActionHandler, times(0)).sendMessageAtTime(message.capture(), anyLong()); in testCarrierActionResetOnAPM() 105 verify(mDataActionHandler, times(1)).sendMessageAtTime(message.capture(), anyLong()); in testCarrierActionResetOnAPM() 108 verify(mRadioActionHandler, times(1)).sendMessageAtTime(message.capture(), anyLong()); in testCarrierActionResetOnAPM() 119 verify(mDataActionHandler, times(2)).sendMessageAtTime(message.capture(), anyLong()); in testCarrierActionResetOnAPM() 123 verify(mRadioActionHandler, times(2)).sendMessageAtTime(message.capture(), anyLong()); in testCarrierActionResetOnAPM() 140 verify(mDataActionHandler, times(0)).sendMessageAtTime(message.capture(), anyLong()); in testCarrierActionResetOnAPNChange() 141 verify(mRadioActionHandler, times(0)).sendMessageAtTime(message.capture(), anyLong()); in testCarrierActionResetOnAPNChange() 148 verify(mDataActionHandler, times(1)).sendMessageAtTime(message.capture(), anyLong()); in testCarrierActionResetOnAPNChange() [all …]
|
D | CallManagerTest.java | 31 import static org.mockito.Mockito.times; 114 verify(mPhone, times(1)).dial(mCaptorString.capture(), dialArgsCaptor.capture()); in testBasicDial() 124 verify(mPhone, times(1)).rejectCall(); in testBasicRejectCall() 130 verify(mPhone, times(0)).sendDtmf(eq('a')); in testSendDtmf() 136 verify(mPhone, times(1)).sendDtmf(eq('a')); in testSendDtmf() 143 verify(mPhone, times(0)).startDtmf(anyChar()); in testStartDtmf() 149 verify(mPhone, times(1)).startDtmf('a'); in testStartDtmf() 156 verify(mPhone, times(0)).stopDtmf(); in testStopDtmf() 162 verify(mPhone, times(1)).stopDtmf(); in testStopDtmf() 169 verify(mPhone, times(0)).sendBurstDtmf(anyString(), anyInt(), anyInt(), (Message) any()); in testSendBurstDtmf() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/ |
D | ShortcutManagerTest11.java | 24 import static org.mockito.Mockito.times; 69 verify(callback, times(1)).onShortcutsAddedOrUpdated( in testShortcutChangeCallback_setDynamicShortcuts() 71 verify(callback, times(0)).onShortcutsRemoved(any(), any(), any()); in testShortcutChangeCallback_setDynamicShortcuts() 96 verify(callback, times(1)).onShortcutsAddedOrUpdated( in testShortcutChangeCallback_setDynamicShortcuts_replaceSameId() 100 verify(callback, times(1)).onShortcutsRemoved( in testShortcutChangeCallback_setDynamicShortcuts_replaceSameId() 138 verify(callback, times(1)).onShortcutsAddedOrUpdated( in testShortcutChangeCallback_setDynamicShortcuts_pinnedAndCached() 140 verify(callback, times(0)).onShortcutsRemoved(any(), any(), any()); in testShortcutChangeCallback_setDynamicShortcuts_pinnedAndCached() 162 verify(callback, times(1)).onShortcutsAddedOrUpdated( in testShortcutChangeCallback_pinShortcuts() 164 verify(callback, times(0)).onShortcutsRemoved(any(), any(), any()); in testShortcutChangeCallback_pinShortcuts() 194 verify(callback, times(1)).onShortcutsAddedOrUpdated( in testShortcutChangeCallback_pinShortcuts_unpinOthers() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/power/ |
D | ThermalManagerServiceTest.java | 217 .times(0)).notifyThrottling(any(Temperature.class)); in setUp() 219 .times(1)).onStatusChange(Temperature.THROTTLING_NONE); in setUp() 221 .times(0)).notifyThrottling(any(Temperature.class)); in setUp() 223 .times(1)).onStatusChange(Temperature.THROTTLING_NONE); in setUp() 228 .times(4)).notifyThrottling(captor.capture()); in setUp() 231 .times(0)).onStatusChange(Temperature.THROTTLING_NONE); in setUp() 234 .times(2)).notifyThrottling(captor.capture()); in setUp() 239 .times(0)).onStatusChange(Temperature.THROTTLING_NONE); in setUp() 261 .times(4)).notifyThrottling(captor.capture()); in testRegister() 264 .times(1)).onStatusChange(Temperature.THROTTLING_NONE); in testRegister() [all …]
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/location/provider/ |
D | StationaryThrottlingLocationProviderTest.java | 26 import static org.mockito.Mockito.times; 100 verify(mListener, times(1)).onReportLocation(any(LocationResult.class)); in testThrottle() 107 verify(mListener, timeout(75).times(2)).onReportLocation(any(LocationResult.class)); in testThrottle() 108 verify(mListener, timeout(75).times(3)).onReportLocation(any(LocationResult.class)); in testThrottle() 111 verify(mDelegate, times(2)).onSetRequest(request); in testThrottle() 112 verify(mListener, after(75).times(3)).onReportLocation(any(LocationResult.class)); in testThrottle() 127 verify(mListener, times(1)).onReportLocation(any(LocationResult.class)); in testThrottle_NoInitialLocation() 128 verify(mDelegate, times(1)).onSetRequest(ProviderRequest.EMPTY_REQUEST); in testThrottle_NoInitialLocation() 129 verify(mListener, timeout(75).times(2)).onReportLocation(any(LocationResult.class)); in testThrottle_NoInitialLocation() 132 verify(mDelegate, times(2)).onSetRequest(request); in testThrottle_NoInitialLocation() [all …]
|
/frameworks/base/core/jni/ |
D | com_android_internal_os_KernelCpuUidBpfMapReader.cpp | 73 for (auto &[uid, times] : *data) { in KernelCpuUidFreqTimeBpfMapReader_readBpfData() 75 for (const auto &subVec : times) s += subVec.size(); in KernelCpuUidFreqTimeBpfMapReader_readBpfData() 79 copy2DVecToArray(env, ar, times); in KernelCpuUidFreqTimeBpfMapReader_readBpfData() 98 for (auto &[uid, times] : *data) { in KernelCpuUidActiveTimeBpfMapReader_readBpfData() 100 for (auto &time : times.active) time /= NSEC_PER_MSEC; in KernelCpuUidActiveTimeBpfMapReader_readBpfData() 101 jlongArray ar = getUidArray(env, sparseAr, uid, times.active.size()); in KernelCpuUidActiveTimeBpfMapReader_readBpfData() 103 env->SetLongArrayRegion(ar, 0, times.active.size(), in KernelCpuUidActiveTimeBpfMapReader_readBpfData() 104 reinterpret_cast<const jlong *>(times.active.data())); in KernelCpuUidActiveTimeBpfMapReader_readBpfData() 132 for (auto &[uid, times] : *data) { in KernelCpuUidClusterTimeBpfMapReader_readBpfData() 134 for (const auto &subVec : times.policy) s += subVec.size(); in KernelCpuUidClusterTimeBpfMapReader_readBpfData() [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | BinderDeathDispatcherTest.java | 23 import static org.mockito.Mockito.times; 231 verify(r1, times(1)).binderDied(t1); in testRegisterAndKill() 232 verify(r2, times(1)).binderDied(t1); in testRegisterAndKill() 233 verify(r3, times(1)).binderDied(t1); in testRegisterAndKill() 234 verify(r4, times(0)).binderDied(any()); in testRegisterAndKill() 235 verify(r5, times(0)).binderDied(any()); in testRegisterAndKill() 242 verify(r1, times(1)).binderDied(t2); in testRegisterAndKill() 243 verify(r2, times(0)).binderDied(any()); in testRegisterAndKill() 244 verify(r3, times(0)).binderDied(any()); in testRegisterAndKill() 245 verify(r4, times(0)).binderDied(any()); in testRegisterAndKill() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/ |
D | FingerprintGestureDispatcherTest.java | 23 import static org.mockito.Mockito.times; 93 verify(mNonGestureCapturingClient, times(0)) in testOneNonCapturingService_doesNotCrashOrConsumeGestures() 95 verify(mNonGestureCapturingClient, times(0)).onFingerprintGesture(anyInt()); in testOneNonCapturingService_doesNotCrashOrConsumeGestures() 104 verify(mGestureCapturingClient, times(1)).onFingerprintGestureDetectionActiveChanged(false); in testOneCapturingService_notifiesClientOfActivityChanges() 105 verify(mGestureCapturingClient, times(0)).onFingerprintGestureDetectionActiveChanged(true); in testOneCapturingService_notifiesClientOfActivityChanges() 107 verify(mGestureCapturingClient, times(1)).onFingerprintGestureDetectionActiveChanged(false); in testOneCapturingService_notifiesClientOfActivityChanges() 108 verify(mGestureCapturingClient, times(1)).onFingerprintGestureDetectionActiveChanged(true); in testOneCapturingService_notifiesClientOfActivityChanges() 117 verify(mGestureCapturingClient, times(1)).onFingerprintGesture( in testOneCapturingService_consumesGesturesAndPassesThemAlong() 121 verify(mGestureCapturingClient, times(1)).onFingerprintGesture( in testOneCapturingService_consumesGesturesAndPassesThemAlong() 125 verify(mGestureCapturingClient, times(1)).onFingerprintGesture( in testOneCapturingService_consumesGesturesAndPassesThemAlong() [all …]
|
D | FingerprintGestureControllerTest.java | 25 import static org.mockito.Mockito.times; 78 verify(mMockFingerprintGestureCallback, times(1)) in testDetectionActiveCallback_noHandler_shouldCallback() 81 verify(mMockFingerprintGestureCallback, times(1)) in testDetectionActiveCallback_noHandler_shouldCallback() 102 verify(mMockFingerprintGestureCallback, times(0)) in testDetectionActiveCallback_withHandler_shouldPostRunnableToHandler() 105 verify(mMockFingerprintGestureCallback, times(1)) in testDetectionActiveCallback_withHandler_shouldPostRunnableToHandler() 109 verify(mMockFingerprintGestureCallback, times(0)) in testDetectionActiveCallback_withHandler_shouldPostRunnableToHandler() 112 verify(mMockFingerprintGestureCallback, times(1)) in testDetectionActiveCallback_withHandler_shouldPostRunnableToHandler() 131 verify(mMockFingerprintGestureCallback, times(1)) in testGestureCallback_noHandler_shouldCallListener() 151 verify(mMockFingerprintGestureCallback, times(0)) in testGestureCallback_withHandler_shouldPostRunnableToHandler() 154 verify(mMockFingerprintGestureCallback, times(1)) in testGestureCallback_withHandler_shouldPostRunnableToHandler()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/telephony/ |
D | TelephonyListenerManagerTest.java | 21 import static org.mockito.Mockito.times; 70 verify(mTelephonyManager, times(1)) in testAddListenerRegisters_ActiveDataSubscriptionIdListener() 82 verify(mTelephonyManager, times(1)) in testAddListenerRegisters_CallStateListener() 94 verify(mTelephonyManager, times(1)) in testAddListenerRegisters_ServiceStateListener() 108 verify(mTelephonyManager, times(1)) in testAddListenerRegisters_mixed() 119 verify(mTelephonyManager, times(1)) in testRemoveListenerUnregisters_ActiveDataSubscriptionIdListener() 128 verify(mTelephonyManager, times(1)) in testRemoveListenerUnregisters_ActiveDataSubscriptionIdListener() 139 verify(mTelephonyManager, times(1)) in testRemoveListenerUnregisters_CallStateListener() 148 verify(mTelephonyManager, times(1)) in testRemoveListenerUnregisters_CallStateListener() 159 verify(mTelephonyManager, times(1)) in testRemoveListenerUnregisters_ServiceStateListener() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/power/ |
D | PowerNotificationWarningsTest.java | 28 import static org.mockito.Mockito.times; 89 verify(mMockNotificationManager, times(1)) in testShowInvalidChargerNotification_NotifyAsUser() 91 verify(mMockNotificationManager, times(1)).cancelAsUser(anyString(), in testShowInvalidChargerNotification_NotifyAsUser() 99 verify(mMockNotificationManager, times(1)).cancelAsUser(anyString(), in testDismissInvalidChargerNotification_CancelAsUser() 106 verify(mMockNotificationManager, times(1)) in testShowLowBatteryNotification_NotifyAsUser() 108 verify(mMockNotificationManager, times(1)).cancelAsUser(anyString(), in testShowLowBatteryNotification_NotifyAsUser() 116 verify(mMockNotificationManager, times(1)).cancelAsUser(anyString(), in testDismissLowBatteryNotification_CancelAsUser() 133 verify(mMockNotificationManager, times(1)) in testShowHighTemperatureWarning_NotifyAsUser() 141 verify(mMockNotificationManager, times(1)).cancelAsUser(anyString(), in testDismissHighTemperatureWarning_CancelAsUser() 148 verify(mMockNotificationManager, times(1)) in testShowThermalShutdownWarning_NotifyAsUser() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/ |
D | BatterySaverUtilsTest.java | 25 import static org.mockito.Mockito.times; 73 verify(mMockContext, times(1)).sendBroadcast(any(Intent.class)); in testSetPowerSaveMode_enable_firstCall_needWarning() 74 verify(mMockPowerManager, times(0)).setPowerSaveModeEnabled(anyBoolean()); in testSetPowerSaveMode_enable_firstCall_needWarning() 90 verify(mMockContext, times(0)).sendBroadcast(any(Intent.class)); in testSetPowerSaveMode_enable_secondCall_needWarning() 91 verify(mMockPowerManager, times(1)).setPowerSaveModeEnabled(eq(true)); in testSetPowerSaveMode_enable_secondCall_needWarning() 104 verify(mMockContext, times(0)).sendBroadcast(any(Intent.class)); in testSetPowerSaveMode_enable_thridCall_needWarning() 105 verify(mMockPowerManager, times(1)).setPowerSaveModeEnabled(eq(true)); in testSetPowerSaveMode_enable_thridCall_needWarning() 118 verify(mMockContext, times(0)).sendBroadcast(any(Intent.class)); in testSetPowerSaveMode_enable_firstCall_noWarning() 119 verify(mMockPowerManager, times(1)).setPowerSaveModeEnabled(eq(true)); in testSetPowerSaveMode_enable_firstCall_noWarning() 133 verify(mMockContext, times(0)).sendBroadcast(any(Intent.class)); in testSetPowerSaveMode_disable_firstCall_noWarning() [all …]
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/location/injector/ |
D | SystemUserInfoHelperTest.java | 20 import static org.mockito.Mockito.times; 80 verify(listener, times(1)).onUserChanged(USER1_ID, UserListener.CURRENT_USER_CHANGED); in testListener_SwitchUser() 81 verify(listener, times(1)).onUserChanged(USER1_MANAGED_ID, in testListener_SwitchUser() 83 verify(listener, times(1)).onUserChanged(USER2_ID, UserListener.CURRENT_USER_CHANGED); in testListener_SwitchUser() 84 verify(listener, times(1)).onUserChanged(USER2_MANAGED_ID, in testListener_SwitchUser() 88 verify(listener, times(2)).onUserChanged(USER2_ID, UserListener.CURRENT_USER_CHANGED); in testListener_SwitchUser() 89 verify(listener, times(2)).onUserChanged(USER2_MANAGED_ID, in testListener_SwitchUser() 91 verify(listener, times(2)).onUserChanged(USER1_ID, UserListener.CURRENT_USER_CHANGED); in testListener_SwitchUser() 92 verify(listener, times(2)).onUserChanged(USER1_MANAGED_ID, in testListener_SwitchUser()
|
/frameworks/native/libs/cputimeinstate/ |
D | testtimeinstate.cpp | 49 auto times = getTotalCpuFreqTimes(); in TEST() local 50 ASSERT_TRUE(times.has_value()); in TEST() 51 EXPECT_FALSE(times->empty()); in TEST() 55 auto times = getUidCpuFreqTimes(0); in TEST() local 56 ASSERT_TRUE(times.has_value()); in TEST() 57 EXPECT_FALSE(times->empty()); in TEST() 121 auto times = getUidCpuFreqTimes(0); in TEST() local 122 ASSERT_TRUE(times.has_value()); in TEST() 127 ASSERT_NO_FATAL_FAILURE(TestUidTimesConsistent(*times, *concurrentTimes)); in TEST() 356 auto times = kv.second; in TEST() local [all …]
|