Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1376)

Unified Diff: build/android/devil/android/device_utils_test.py

Issue 1398613002: DeviceUtils.ForceStop: no-op if the app isn't running (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/devil/android/device_utils.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/devil/android/device_utils_test.py
diff --git a/build/android/devil/android/device_utils_test.py b/build/android/devil/android/device_utils_test.py
index e474e10266c89bf71a891bbe48c17f88286ce5d5..db59e65797af14d096ee1fb0f28377596109ad78 100755
--- a/build/android/devil/android/device_utils_test.py
+++ b/build/android/devil/android/device_utils_test.py
@@ -627,8 +627,7 @@ class DeviceUtilsInstallTest(DeviceUtilsTest):
(self.call.device._ComputeStaleApks('test.package',
['/fake/test/app.apk']),
([], None)),
- (self.call.device.RunShellCommand(['am', 'force-stop', 'test.package'],
- check_return=True))):
+ (self.call.device.ForceStop('test.package'))):
self.device.Install(DeviceUtilsInstallTest.mock_apk,
reinstall=True, retries=0, permissions=[])
@@ -1320,7 +1319,8 @@ class DeviceUtilsForceStopTest(DeviceUtilsTest):
def testForceStop(self):
with self.assertCall(
- self.call.adb.Shell('am force-stop test.package'),
+ self.call.adb.Shell('p=test.package;if [[ "$(ps)" = *$p* ]]; then '
+ 'am force-stop $p; fi'),
''):
self.device.ForceStop('test.package')
« no previous file with comments | « build/android/devil/android/device_utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698