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

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

Issue 929603002: [Android] Add PIE support for ICS devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/device/device_utils.py ('k') | build/android/pylib/utils/md5sum.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 4ef158e2ddb7a406d288dbbaab846437f745c677..8a25f2505794b39baca67d1205348b589f0cd35f 100755
--- a/build/android/pylib/device/device_utils_test.py
+++ b/build/android/pylib/device/device_utils_test.py
@@ -656,6 +656,24 @@ class DeviceUtilsRunShellCommandTest(DeviceUtilsNewImplTest):
self.device.RunShellCommand(cmd, check_return=False))
+class DeviceUtilsGetDevicePieWrapper(DeviceUtilsNewImplTest):
+
+ def testGetDevicePieWrapper_jb(self):
+ with self.assertCall(
+ self.call.device.build_version_sdk(),
+ constants.ANDROID_SDK_VERSION_CODES.JELLY_BEAN):
+ self.assertEqual('', self.device.GetDevicePieWrapper())
+
+ def testGetDevicePieWrapper_ics(self):
+ with self.assertCalls(
+ (self.call.device.build_version_sdk(),
+ constants.ANDROID_SDK_VERSION_CODES.ICE_CREAM_SANDWICH),
+ (mock.call.pylib.constants.GetOutDirectory(), '/foo/bar'),
+ (mock.call.os.path.exists(mock.ANY), True),
+ (self.call.adb.Push(mock.ANY, mock.ANY), '')):
+ self.assertNotEqual('', self.device.GetDevicePieWrapper())
+
+
@mock.patch('time.sleep', mock.Mock())
class DeviceUtilsKillAllTest(DeviceUtilsNewImplTest):
« no previous file with comments | « build/android/pylib/device/device_utils.py ('k') | build/android/pylib/utils/md5sum.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698