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

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

Issue 655723003: [Android] Don't use zip pushing if not built or on user builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/pylib/device/device_utils.py ('k') | build/java_apk.gypi » ('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 52aef0ac3f7eba3d2cca87788efd579ad28913e8..513b538f84c028f704613195cc44754785d69958 100755
--- a/build/android/pylib/device/device_utils_test.py
+++ b/build/android/pylib/device/device_utils_test.py
@@ -288,6 +288,21 @@ class DeviceUtilsEnableRootTest(DeviceUtilsOldImplTest):
self.device.EnableRoot()
+class DeviceUtilsIsUserBuildTest(DeviceUtilsOldImplTest):
+
+ def testIsUserBuild_yes(self):
+ with self.assertCalls(
+ 'adb -s 0123456789abcdef shell getprop ro.build.type',
+ 'user\r\n'):
+ self.assertTrue(self.device.IsUserBuild())
+
+ def testIsUserBuild_no(self):
+ with self.assertCalls(
+ 'adb -s 0123456789abcdef shell getprop ro.build.type',
+ 'userdebug\r\n'):
+ self.assertFalse(self.device.IsUserBuild())
+
+
class DeviceUtilsGetExternalStoragePathTest(DeviceUtilsOldImplTest):
def testGetExternalStoragePath_succeeds(self):
@@ -896,12 +911,12 @@ class DeviceUtilsPushChangedFilesIndividuallyTest(DeviceUtilsNewImplTest):
'/test/host/path/file2', '/test/device/path/file2')
+@mock.patch('pylib.device.commands.install_commands.Installed', new=None)
+@mock.patch('pylib.device.commands.install_commands.InstallCommands', new=None)
class DeviceUtilsPushChangedFilesZippedTest(DeviceUtilsHybridImplTest):
def setUp(self):
super(DeviceUtilsPushChangedFilesZippedTest, self).setUp()
- self.original_install_commands = self.device._InstallCommands
- self.device._InstallCommands = mock.Mock()
def testPushChangedFilesZipped_empty(self):
test_files = []
« no previous file with comments | « build/android/pylib/device/device_utils.py ('k') | build/java_apk.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698