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

Side by Side Diff: telemetry/telemetry/internal/backends/chrome/android_browser_finder.py

Issue 2321663002: [telemetry] Make browser finding on android tolerate device faults. (Closed)
Patch Set: nit: import order Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Finds android browsers that can be controlled by telemetry.""" 5 """Finds android browsers that can be controlled by telemetry."""
6 6
7 import logging 7 import logging
8 import os 8 import os
9 import sys 9 import sys
10 10
11 from py_utils import dependency_util 11 from py_utils import dependency_util
12 from devil import base_error
12 from devil.android import apk_helper 13 from devil.android import apk_helper
13 14
14 from telemetry.core import exceptions 15 from telemetry.core import exceptions
15 from telemetry.core import platform 16 from telemetry.core import platform
16 from telemetry.core import util 17 from telemetry.core import util
17 from telemetry import decorators 18 from telemetry import decorators
18 from telemetry.internal.backends import android_browser_backend_settings 19 from telemetry.internal.backends import android_browser_backend_settings
19 from telemetry.internal.backends.chrome import android_browser_backend 20 from telemetry.internal.backends.chrome import android_browser_backend
20 from telemetry.internal.browser import browser 21 from telemetry.internal.browser import browser
21 from telemetry.internal.browser import possible_browser 22 from telemetry.internal.browser import possible_browser
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 249
249 250
250 def FindAllAvailableBrowsers(finder_options, device): 251 def FindAllAvailableBrowsers(finder_options, device):
251 """Finds all the possible browsers on one device. 252 """Finds all the possible browsers on one device.
252 253
253 The device is either the only device on the host platform, 254 The device is either the only device on the host platform,
254 or |finder_options| specifies a particular device. 255 or |finder_options| specifies a particular device.
255 """ 256 """
256 if not isinstance(device, android_device.AndroidDevice): 257 if not isinstance(device, android_device.AndroidDevice):
257 return [] 258 return []
258 android_platform = platform.GetPlatformForDevice(device, finder_options) 259
259 return _FindAllPossibleBrowsers(finder_options, android_platform) 260 try:
261 android_platform = platform.GetPlatformForDevice(device, finder_options)
262 return _FindAllPossibleBrowsers(finder_options, android_platform)
263 except base_error.BaseError as e:
264 logging.error('Unable to find browsers on %s: %s', device.device_id, str(e))
265 return []
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698