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

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

Issue 392983003: Add a workaround for broken adb get-state call. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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/pylib/android_commands.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cb67d2faeee9f054f989dc6f8ff1557b55a17a51..216fc387cb7131702b545110b745e87fe198c933 100755
--- a/build/android/pylib/device/device_utils_test.py
+++ b/build/android/pylib/device/device_utils_test.py
@@ -142,12 +142,12 @@ class DeviceUtilsOldImplTest(unittest.TestCase):
class DeviceUtilsIsOnlineTest(DeviceUtilsOldImplTest):
def testIsOnline_true(self):
- with self.assertCalls('adb -s 0123456789abcdef get-state',
- 'device\r\n'):
+ with self.assertCalls('adb -s 0123456789abcdef devices',
+ '00123456789abcdef device\r\n'):
self.assertTrue(self.device.IsOnline())
def testIsOnline_false(self):
- with self.assertCalls('adb -s 0123456789abcdef get-state', '\r\n'):
+ with self.assertCalls('adb -s 0123456789abcdef devices', '\r\n'):
self.assertFalse(self.device.IsOnline())
@@ -309,7 +309,7 @@ class DeviceUtilsRebootTest(DeviceUtilsOldImplTest):
with mock.patch('time.sleep'):
with self.assertCallsSequence([
('adb -s 0123456789abcdef reboot', ''),
- ('adb -s 0123456789abcdef get-state', 'unknown\r\n'),
+ ('adb -s 0123456789abcdef devices', 'unknown\r\n'),
('adb -s 0123456789abcdef wait-for-device', ''),
('adb -s 0123456789abcdef shell pm path android',
'package:this.is.a.test.package'),
@@ -323,7 +323,7 @@ class DeviceUtilsRebootTest(DeviceUtilsOldImplTest):
with mock.patch('time.sleep'):
with self.assertCallsSequence([
('adb -s 0123456789abcdef reboot', ''),
- ('adb -s 0123456789abcdef get-state', 'unknown\r\n'),
+ ('adb -s 0123456789abcdef devices', 'unknown\r\n'),
('adb -s 0123456789abcdef wait-for-device', ''),
('adb -s 0123456789abcdef shell pm path android',
'package:this.is.a.test.package'),
« no previous file with comments | « build/android/pylib/android_commands.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698