Home
last modified time | relevance | path

Searched refs:mUiDevice (Results 1 – 14 of 14) sorted by relevance

/platform_testing/libraries/collectors-helper/memory/test/src/com/android/helpers/tests/
DGarbageCollectionHelperTest.java43 private @Mock UiDevice mUiDevice; field in GarbageCollectionHelperTest
60 }).when(mUiDevice).executeShellCommand(any()); in setUp()
71 verifyZeroInteractions(mUiDevice); in testNoSetUp()
82 InOrder inOrder = inOrder(mUiDevice); in testOneAppToGc()
83 inOrder.verify(mUiDevice).executeShellCommand("pidof package.name1"); in testOneAppToGc()
84 inOrder.verify(mUiDevice).executeShellCommand("kill -10 1"); in testOneAppToGc()
95 InOrder inOrder = inOrder(mUiDevice); in testMultipleAppsToGc()
96 inOrder.verify(mUiDevice).executeShellCommand("pidof package.name1"); in testMultipleAppsToGc()
97 inOrder.verify(mUiDevice).executeShellCommand("kill -10 1"); in testMultipleAppsToGc()
98 inOrder.verify(mUiDevice).executeShellCommand("pidof package.name2"); in testMultipleAppsToGc()
[all …]
/platform_testing/libraries/collectors-helper/memory/src/com/android/helpers/
DGarbageCollectionHelper.java40 private UiDevice mUiDevice; field in GarbageCollectionHelper
49 mUiDevice = initUiDevice(); in setUp()
72 if (mProcessNames == null || mUiDevice == null) { in garbageCollect()
80 String pidofOutput = mUiDevice.executeShellCommand( in garbageCollect()
83 mUiDevice.executeShellCommand(String.format(GC_CMD, pidofOutput)); in garbageCollect()
DProcessShowmapHelper.java63 private UiDevice mUiDevice; field in ProcessShowmapHelper
78 mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp()
139 if (processNames == null || mUiDevice == null) { in sampleMemoryOfProcesses()
160 String pidofOutput = mUiDevice.executeShellCommand( in sampleMemory()
171 showmapOutput = mUiDevice.executeShellCommand(String.format(SHOWMAP_CMD, pid)); in sampleMemory()
DDumpsysMeminfoHelper.java83 private UiDevice mUiDevice; field in DumpsysMeminfoHelper
94 mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in startCollecting()
118 String pidStr = mUiDevice.executeShellCommand(String.format(PIDOF_CMD, processName)); in getRawDumpsysMeminfo()
122 return mUiDevice.executeShellCommand(String.format(DUMPSYS_MEMINFO_CMD, pidStr)); in getRawDumpsysMeminfo()
DShowmapSnapshotHelper.java57 private UiDevice mUiDevice; field in ShowmapSnapshotHelper
70 mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp()
193 mUiDevice.executeShellCommand(String.format(DROP_CACHES_CMD, cacheOption)); in dropCache()
207 String pidofOutput = mUiDevice.executeShellCommand(String.format(PIDOF_CMD, processName)); in getPids()
232 return mUiDevice.executeShellCommand(String.format(SHOWMAP_CMD, pid)); in execShowMap()
331 String psOutput = mUiDevice.executeShellCommand(ALL_PROCESSES_CMD); in getAllProcessNames()
DFreeMemHelper.java64 private UiDevice mUiDevice; field in FreeMemHelper
68 mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in startCollecting()
81 memInfo = mUiDevice.executeShellCommand(PROC_MEMINFO); in getMetrics()
126 processInfoStr = mUiDevice.executeShellCommand(processDumpSysMemInfo); in getMetrics()
/platform_testing/libraries/health/rules/tests/src/android/platform/test/rule/
DUnlockScreenRuleTest.java86 private UiDevice mUiDevice; field in UnlockScreenRuleTest.TestableUnlockScreenRule
91 mUiDevice = Mockito.mock(UiDevice.class); in TestableUnlockScreenRule()
99 when(mUiDevice.isScreenOn()).thenReturn(mIsScreenOn); in getUiDevice()
100 when(mUiDevice.hasObject(SCREEN_LOCK)).thenReturn(!mIsUnlocked); in getUiDevice()
104 return mUiDevice; in getUiDevice()
DNaturalOrientationRuleTest.java57 private UiDevice mUiDevice; field in NaturalOrientationRuleTest.TestableNaturalOrientationRule
60 mUiDevice = Mockito.mock(UiDevice.class); in TestableNaturalOrientationRule()
65 return mUiDevice; in getUiDevice()
DPressHomeRuleTest.java84 private UiDevice mUiDevice; field in PressHomeRuleTest.TestablePressHomeRule
88 mUiDevice = Mockito.mock(UiDevice.class); in TestablePressHomeRule()
99 return mUiDevice; in getUiDevice()
/platform_testing/libraries/collectors-helper/jank/test/src/com/android/helpers/
DJankCollectionHelperTest.java88 private @Mock UiDevice mUiDevice; field in JankCollectionHelperTest
95 when(mHelper.getDevice()).thenReturn(mUiDevice); in setUp()
296 when(mUiDevice.executeShellCommand(cmd)).thenThrow(new RuntimeException()); in testCollect_delayExceptions_onReset()
306 InOrder inOrder = inOrder(mUiDevice); in testCollect_delayExceptions_onReset()
307 inOrder.verify(mUiDevice) in testCollect_delayExceptions_onReset()
309 inOrder.verify(mUiDevice) in testCollect_delayExceptions_onReset()
311 inOrder.verify(mUiDevice) in testCollect_delayExceptions_onReset()
324 when(mUiDevice.executeShellCommand(cmd)).thenThrow(new RuntimeException()); in testCollect_delayExceptions_onGet()
335 InOrder inOrder = inOrder(mUiDevice); in testCollect_delayExceptions_onGet()
336 inOrder.verify(mUiDevice) in testCollect_delayExceptions_onGet()
[all …]
DSfStatsCollectionHelperTest.java130 private @Mock UiDevice mUiDevice; field in SfStatsCollectionHelperTest
137 when(mHelper.getDevice()).thenReturn(mUiDevice); in setUp()
285 when(mUiDevice.executeShellCommand(SFSTATS_COMMAND_ENABLE_AND_CLEAR)).thenReturn(""); in mockEnableAndClearCommand()
289 when(mUiDevice.executeShellCommand(SFSTATS_COMMAND_DUMP)).thenReturn(SFSTATS_DUMP); in mockDumpCommand()
293 when(mUiDevice.executeShellCommand(SFSTATS_COMMAND_DISABLE_AND_CLEAR)).thenReturn(""); in mockDisableAndClearCommand()
DBinderCollectionHelperTest.java44 private @Mock UiDevice mUiDevice; field in BinderCollectionHelperTest
94 when(mHelper.getDevice()).thenReturn(mUiDevice); in setUp()
/platform_testing/libraries/launcher-helper/src/android/support/test/launcherhelper/
DLauncherStrategyFactory.java34 private UiDevice mUiDevice; field in LauncherStrategyFactory
40 mUiDevice = uiDevice; in LauncherStrategyFactory()
96 String launcherPkg = mUiDevice.getLauncherPackageName(); in getLauncherStrategy()
100 strategy.setUiDevice(mUiDevice); in getLauncherStrategy()
/platform_testing/libraries/collectors-helper/power/test/src/com/android/helpers/
DPwrStatsUtilHelperTest.java41 private @Mock UiDevice mUiDevice; field in PwrStatsUtilHelperTest