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

Side by Side Diff: tools/telemetry/telemetry/core/chrome/cros_browser_finder.py

Issue 12278015: [Telemetry] Reorganize everything. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-add shebangs. Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 """Finds android browsers that can be controlled by telemetry.""" 4 """Finds android browsers that can be controlled by telemetry."""
5 5
6 import logging 6 import logging
7 7
8 from telemetry import browser 8 from telemetry.core import browser
9 from telemetry import platform 9 from telemetry.core import possible_browser
10 from telemetry import possible_browser 10 from telemetry.core.chrome import platform
11 from telemetry import cros_browser_backend 11 from telemetry.core.chrome import cros_browser_backend
12 from telemetry import cros_interface 12 from telemetry.core.chrome import cros_interface
13 13
14 ALL_BROWSER_TYPES = ','.join([ 14 ALL_BROWSER_TYPES = ','.join([
15 'cros-chrome', 15 'cros-chrome',
16 ]) 16 ])
17 17
18 class PossibleCrOSBrowser(possible_browser.PossibleBrowser): 18 class PossibleCrOSBrowser(possible_browser.PossibleBrowser):
19 """A launchable chromeos browser instance.""" 19 """A launchable chromeos browser instance."""
20 def __init__(self, browser_type, options, *args): 20 def __init__(self, browser_type, options, *args):
21 super(PossibleCrOSBrowser, self).__init__(browser_type, options) 21 super(PossibleCrOSBrowser, self).__init__(browser_type, options)
22 self._args = args 22 self._args = args
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 logging.warn('') 71 logging.warn('')
72 logging.warn('P.S. Please, tell your manager how INANE this is.') 72 logging.warn('P.S. Please, tell your manager how INANE this is.')
73 else: 73 else:
74 logging.warn(str(ex)) 74 logging.warn(str(ex))
75 return [] 75 return []
76 76
77 if not cri.FileExistsOnDevice('/opt/google/chrome/chrome'): 77 if not cri.FileExistsOnDevice('/opt/google/chrome/chrome'):
78 logging.warn('Could not find a chrome on ' % cri.hostname) 78 logging.warn('Could not find a chrome on ' % cri.hostname)
79 79
80 return [PossibleCrOSBrowser('cros-chrome', options, cri)] 80 return [PossibleCrOSBrowser('cros-chrome', options, cri)]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698