OLD | NEW |
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 browsers that can be controlled by telemetry.""" | 4 """Finds browsers that can be controlled by telemetry.""" |
5 | 5 |
6 import logging | 6 import logging |
7 | 7 |
8 from telemetry.core.chrome import android_browser_finder | 8 from telemetry.core.chrome import android_browser_finder |
9 from telemetry.core.chrome import cros_browser_finder | 9 from telemetry.core.chrome import cros_browser_finder |
10 from telemetry.core.chrome import desktop_browser_finder | 10 from telemetry.core.chrome import desktop_browser_finder |
| 11 from telemetry.core.backends.webdriver import webdriver_desktop_browser_finder |
11 | 12 |
12 BROWSER_FINDERS = [ | 13 BROWSER_FINDERS = [ |
13 desktop_browser_finder, | 14 desktop_browser_finder, |
14 android_browser_finder, | 15 android_browser_finder, |
15 cros_browser_finder | 16 cros_browser_finder, |
| 17 webdriver_desktop_browser_finder |
16 ] | 18 ] |
17 | 19 |
18 ALL_BROWSER_TYPES = ','.join([bf.ALL_BROWSER_TYPES for bf in BROWSER_FINDERS]) | 20 ALL_BROWSER_TYPES = ','.join([bf.ALL_BROWSER_TYPES for bf in BROWSER_FINDERS]) |
19 | 21 |
20 | 22 |
21 class BrowserTypeRequiredException(Exception): | 23 class BrowserTypeRequiredException(Exception): |
22 pass | 24 pass |
23 | 25 |
24 class BrowserFinderException(Exception): | 26 class BrowserFinderException(Exception): |
25 pass | 27 pass |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 improperly set or if an error occurs when finding a browser. | 97 improperly set or if an error occurs when finding a browser. |
96 """ | 98 """ |
97 browsers = [] | 99 browsers = [] |
98 for finder in BROWSER_FINDERS: | 100 for finder in BROWSER_FINDERS: |
99 browsers.extend(finder.FindAllAvailableBrowsers(options)) | 101 browsers.extend(finder.FindAllAvailableBrowsers(options)) |
100 | 102 |
101 type_list = set([browser.browser_type for browser in browsers]) | 103 type_list = set([browser.browser_type for browser in browsers]) |
102 type_list = list(type_list) | 104 type_list = list(type_list) |
103 type_list.sort() | 105 type_list.sort() |
104 return type_list | 106 return type_list |
OLD | NEW |