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

Unified Diff: tools/telemetry/telemetry/core/platform/android_device_unittest.py

Issue 522553002: Move remote platforms creation logic from android_browser_finder to platform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android_browser_finder_unittest Created 6 years, 3 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
Index: tools/telemetry/telemetry/core/platform/android_device_unittest.py
diff --git a/tools/telemetry/telemetry/core/platform/android_device_unittest.py b/tools/telemetry/telemetry/core/platform/android_device_unittest.py
new file mode 100644
index 0000000000000000000000000000000000000000..3c5c685544f55317448efe81bc3cfcb7559d4312
--- /dev/null
+++ b/tools/telemetry/telemetry/core/platform/android_device_unittest.py
@@ -0,0 +1,26 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import unittest
+
+from telemetry.core.platform import android_device
+from telemetry.unittest import system_stub
+
+
+class AndroidDeviceTest(unittest.TestCase):
+ def setUp(self):
+ self._android_device_stub = system_stub.Override(
+ android_device, ['adb_commands'])
+
+ def testGetAllAttachedAndroidDevices(self):
+ self._android_device_stub.adb_commands.attached_devices = [
+ '01', '02']
+ self.assertEquals(
+ set(['01', '02']),
+ set(device.device_id for device in
+ android_device.AndroidDevice.GetAllConnectedDevices()
+ ))
+
+ def tearDown(self):
+ self._android_device_stub.Restore()

Powered by Google App Engine
This is Rietveld 408576698