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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py

Issue 2161913002: [blink][android] Fix --adb-device in the layout test runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix AndroidPortTest.test_default_child_processes Created 4 years, 5 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 | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py
index cd7fdfb06127387d6daacfa839bf988a0c1637fe..5b62945b7549d95a8561cec0b7042c28eab92ce6 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py
@@ -334,9 +334,9 @@ class AndroidDevices(object):
# to participate in running the layout tests.
MINIMUM_BATTERY_PERCENTAGE = 30
- def __init__(self, executive, default_device=None, debug_logging=False):
+ def __init__(self, default_devices=None, debug_logging=False):
self._usable_devices = []
- self._default_device = default_device
+ self._default_devices = default_devices
self._prepared_devices = []
self._debug_logging = debug_logging
@@ -347,8 +347,10 @@ class AndroidDevices(object):
if self._usable_devices:
return self._usable_devices
- if self._default_device:
- self._usable_devices = [AndroidCommands(executive, self._default_device, self._debug_logging)]
+ if self._default_devices:
+ self._usable_devices = [
+ AndroidCommands(executive, d, self._debug_logging)
+ for d in self._default_devices]
return self._usable_devices
# Example "adb devices" command output:
@@ -437,12 +439,12 @@ class AndroidPort(base.Port):
self._driver_details = ContentShellDriverDetails()
# Initialize the AndroidDevices class which tracks available devices.
- default_device = None
- if hasattr(self._options, 'adb_device') and len(self._options.adb_device):
- default_device = self._options.adb_device
+ default_devices = None
+ if hasattr(self._options, 'adb_devices') and len(self._options.adb_devices):
+ default_devices = self._options.adb_devices
self._debug_logging = self.get_option('android_logging')
- self._devices = AndroidDevices(self._executive, default_device, self._debug_logging)
+ self._devices = AndroidDevices(default_devices, self._debug_logging)
# Tell AndroidCommands where to search for the "adb" command.
AndroidCommands.set_adb_command_path_options(['adb',
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698