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

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

Issue 1282563003: [Android] Convert RestartAdbd to DeviceUtils again. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add device test Created 5 years, 4 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_device_test.py ('k') | build/android/pylib/perf/test_runner.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 1a783c314716af8784b8b5a939a4fbc3ec699fbf..94cc1b3149acbe614b3fae6b5b2823ab9b6aa7ae 100755
--- a/build/android/pylib/device/device_utils_test.py
+++ b/build/android/pylib/device/device_utils_test.py
@@ -1917,7 +1917,20 @@ class DeviceUtilsHealthyDevicesTest(mock_calls.TestCase):
self.assertEquals('0123456789abcdef', devices[0].adb.GetDeviceSerial())
+class DeviceUtilsRestartAdbdTest(DeviceUtilsTest):
+
+ def testAdbdRestart(self):
+ mock_temp_file = '/sdcard/temp-123.sh'
+ with self.assertCalls(
+ (mock.call.pylib.utils.device_temp_file.DeviceTempFile(
+ self.adb, suffix='.sh'), MockTempFile(mock_temp_file)),
+ self.call.device.WriteFile(mock.ANY, mock.ANY),
+ (self.call.device.RunShellCommand(
+ ['source', mock_temp_file ], as_root=True)),
+ self.call.adb.WaitForDevice()):
+ self.device.RestartAdbd()
+
+
if __name__ == '__main__':
logging.getLogger().setLevel(logging.DEBUG)
unittest.main(verbosity=2)
-
« no previous file with comments | « build/android/pylib/device/device_utils_device_test.py ('k') | build/android/pylib/perf/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698