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

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

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/device/device_utils.py ('k') | build/android/pylib/device_settings.py » ('j') | 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 2646bfb53c7e220a96dfb62d468993c4275d84c6..16699adba1b6e39a531ef4454e70f45ec8639676 100755
--- a/build/android/pylib/device/device_utils_test.py
+++ b/build/android/pylib/device/device_utils_test.py
@@ -370,19 +370,25 @@ class DeviceUtilsGetExternalStoragePathTest(DeviceUtilsNewImplTest):
class DeviceUtilsGetApplicationPathTest(DeviceUtilsNewImplTest):
def testGetApplicationPath_exists(self):
- with self.assertCall(self.call.adb.Shell('pm path android'),
- 'package:/path/to/android.apk\n'):
+ with self.assertCalls(
+ (self.call.adb.Shell('getprop ro.build.version.sdk'), '19\n'),
+ (self.call.adb.Shell('pm path android'),
+ 'package:/path/to/android.apk\n')):
self.assertEquals('/path/to/android.apk',
self.device.GetApplicationPath('android'))
def testGetApplicationPath_notExists(self):
- with self.assertCall(self.call.adb.Shell('pm path not.installed.app'), ''):
+ with self.assertCalls(
+ (self.call.adb.Shell('getprop ro.build.version.sdk'), '19\n'),
+ (self.call.adb.Shell('pm path not.installed.app'), '')):
self.assertEquals(None,
self.device.GetApplicationPath('not.installed.app'))
def testGetApplicationPath_fails(self):
- with self.assertCall(self.call.adb.Shell('pm path android'),
- self.CommandError('ERROR. Is package manager running?\n')):
+ with self.assertCalls(
+ (self.call.adb.Shell('getprop ro.build.version.sdk'), '19\n'),
+ (self.call.adb.Shell('pm path android'),
+ self.CommandError('ERROR. Is package manager running?\n'))):
with self.assertRaises(device_errors.CommandFailedError):
self.device.GetApplicationPath('android')
« no previous file with comments | « build/android/pylib/device/device_utils.py ('k') | build/android/pylib/device_settings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698