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

Unified Diff: build/android/pylib/device/device_utils_test.py

Issue 536343003: Kill old browser rather than close (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply change that caused conflict Created 6 years, 3 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
Index: build/android/pylib/device/device_utils_test.py
diff --git a/build/android/pylib/device/device_utils_test.py b/build/android/pylib/device/device_utils_test.py
index 2692e1255b801a5961980f47956c8e8fb9616f63..b7593506c969a175183681efd1786a6d59a97b7b 100755
--- a/build/android/pylib/device/device_utils_test.py
+++ b/build/android/pylib/device/device_utils_test.py
@@ -557,12 +557,9 @@ class DeviceUtilsKillAllTest(DeviceUtilsOldImplTest):
'USER PID PPID VSIZE RSS WCHAN PC NAME\r\n'
'u0_a1 1234 174 123456 54321 ffffffff 456789ab '
'this.is.a.test.process\r\n'),
- ("adb -s 0123456789abcdef shell 'ps'",
- 'USER PID PPID VSIZE RSS WCHAN PC NAME\r\n'
- 'u0_a1 1234 174 123456 54321 ffffffff 456789ab '
- 'this.is.a.test.process\r\n'),
("adb -s 0123456789abcdef shell 'kill -9 1234'", '')]):
- self.device.KillAll('this.is.a.test.process', blocking=False)
+ self.assertEquals(1,
+ self.device.KillAll('this.is.a.test.process', blocking=False))
def testKillAll_blocking(self):
with mock.patch('time.sleep'):
@@ -571,10 +568,6 @@ class DeviceUtilsKillAllTest(DeviceUtilsOldImplTest):
'USER PID PPID VSIZE RSS WCHAN PC NAME\r\n'
'u0_a1 1234 174 123456 54321 ffffffff 456789ab '
'this.is.a.test.process\r\n'),
- ("adb -s 0123456789abcdef shell 'ps'",
- 'USER PID PPID VSIZE RSS WCHAN PC NAME\r\n'
- 'u0_a1 1234 174 123456 54321 ffffffff 456789ab '
- 'this.is.a.test.process\r\n'),
("adb -s 0123456789abcdef shell 'kill -9 1234'", ''),
("adb -s 0123456789abcdef shell 'ps'",
'USER PID PPID VSIZE RSS WCHAN PC NAME\r\n'
@@ -582,7 +575,8 @@ class DeviceUtilsKillAllTest(DeviceUtilsOldImplTest):
'this.is.a.test.process\r\n'),
("adb -s 0123456789abcdef shell 'ps'",
'USER PID PPID VSIZE RSS WCHAN PC NAME\r\n')]):
- self.device.KillAll('this.is.a.test.process', blocking=True)
+ self.assertEquals(1,
+ self.device.KillAll('this.is.a.test.process', blocking=True))
def testKillAll_root(self):
with self.assertCallsSequence([
@@ -590,12 +584,10 @@ class DeviceUtilsKillAllTest(DeviceUtilsOldImplTest):
'USER PID PPID VSIZE RSS WCHAN PC NAME\r\n'
'u0_a1 1234 174 123456 54321 ffffffff 456789ab '
'this.is.a.test.process\r\n'),
- ("adb -s 0123456789abcdef shell 'ps'",
- 'USER PID PPID VSIZE RSS WCHAN PC NAME\r\n'
- 'u0_a1 1234 174 123456 54321 ffffffff 456789ab '
- 'this.is.a.test.process\r\n'),
+ ("adb -s 0123456789abcdef shell 'ls /root'", 'Permission denied\r\n'),
("adb -s 0123456789abcdef shell 'su -c kill -9 1234'", '')]):
- self.device.KillAll('this.is.a.test.process', as_root=True)
+ self.assertEquals(1,
+ self.device.KillAll('this.is.a.test.process', as_root=True))
def testKillAll_sigterm(self):
with self.assertCallsSequence([
@@ -603,12 +595,9 @@ class DeviceUtilsKillAllTest(DeviceUtilsOldImplTest):
'USER PID PPID VSIZE RSS WCHAN PC NAME\r\n'
'u0_a1 1234 174 123456 54321 ffffffff 456789ab '
'this.is.a.test.process\r\n'),
- ("adb -s 0123456789abcdef shell 'ps'",
- 'USER PID PPID VSIZE RSS WCHAN PC NAME\r\n'
- 'u0_a1 1234 174 123456 54321 ffffffff 456789ab '
- 'this.is.a.test.process\r\n'),
("adb -s 0123456789abcdef shell 'kill -15 1234'", '')]):
- self.device.KillAll('this.is.a.test.process', signum=signal.SIGTERM)
+ self.assertEquals(1,
+ self.device.KillAll('this.is.a.test.process', signum=signal.SIGTERM))
class DeviceUtilsStartActivityTest(DeviceUtilsOldImplTest):
« no previous file with comments | « build/android/pylib/device/device_utils.py ('k') | tools/telemetry/telemetry/core/backends/chrome/android_browser_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698