OLD | NEW |
---|---|
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 os | 7 import os |
8 import logging as real_logging | 8 import logging as real_logging |
9 import re | 9 import re |
10 import subprocess | 10 import subprocess |
11 import sys | 11 import sys |
12 | 12 |
13 from telemetry import decorators | 13 from telemetry import decorators |
14 from telemetry.core import browser | 14 from telemetry.core import browser |
15 from telemetry.core import possible_browser | 15 from telemetry.core import possible_browser |
16 from telemetry.core import util | 16 from telemetry.core import util |
17 from telemetry.core.backends import adb_commands | 17 from telemetry.core.backends import adb_commands |
18 from telemetry.core.backends.chrome import android_browser_backend | 18 from telemetry.core.backends.chrome import android_browser_backend |
19 from telemetry.core.platform import android_platform_backend | 19 from telemetry.core.platform import android_platform_backend |
20 | 20 |
21 | 21 |
22 CHROME_PACKAGE_NAMES = { | 22 CHROME_PACKAGE_NAMES = { |
23 'android-content-shell': | 23 'android-content-shell': |
24 ['org.chromium.content_shell_apk', | 24 ['org.chromium.content_shell_apk', |
25 android_browser_backend.ContentShellBackendSettings, | 25 android_browser_backend.ContentShellBackendSettings, |
26 'ContentShell.apk'], | 26 'ContentShell.apk'], |
27 # TODO(tonyg): rename android-chromium-testshell to android-chrome-shell | |
tonyg
2014/06/02 15:20:43
I guess we should keep a TODO here to remove this
| |
28 'android-chromium-testshell': | 27 'android-chromium-testshell': |
29 ['org.chromium.chrome.shell', | 28 ['org.chromium.chrome.shell', |
30 android_browser_backend.ChromeShellBackendSettings, | 29 android_browser_backend.ChromeShellBackendSettings, |
31 'ChromeShell.apk'], | 30 'ChromeShell.apk'], |
31 'android-chrome-shell': | |
32 ['org.chromium.chrome.shell', | |
33 android_browser_backend.ChromeShellBackendSettings, | |
34 'ChromeShell.apk'], | |
32 'android-webview': | 35 'android-webview': |
33 ['com.android.webview.chromium.shell', | 36 ['com.android.webview.chromium.shell', |
34 android_browser_backend.WebviewBackendSettings, | 37 android_browser_backend.WebviewBackendSettings, |
35 None], | 38 None], |
36 'android-chrome': | 39 'android-chrome': |
37 ['com.google.android.apps.chrome', | 40 ['com.google.android.apps.chrome', |
38 android_browser_backend.ChromeBackendSettings, | 41 android_browser_backend.ChromeBackendSettings, |
39 'Chrome.apk'], | 42 'Chrome.apk'], |
40 'android-chrome-beta': | 43 'android-chrome-beta': |
41 ['com.chrome.beta', | 44 ['com.chrome.beta', |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
243 if possible_browsers: | 246 if possible_browsers: |
244 installed_prebuilt_tools = adb_commands.SetupPrebuiltTools(adb) | 247 installed_prebuilt_tools = adb_commands.SetupPrebuiltTools(adb) |
245 if not installed_prebuilt_tools: | 248 if not installed_prebuilt_tools: |
246 logging.error( | 249 logging.error( |
247 'Android device detected, however prebuilt android tools could not ' | 250 'Android device detected, however prebuilt android tools could not ' |
248 'be used. To run on Android you must build them first:\n' | 251 'be used. To run on Android you must build them first:\n' |
249 ' $ ninja -C out/Release android_tools') | 252 ' $ ninja -C out/Release android_tools') |
250 return [] | 253 return [] |
251 | 254 |
252 return possible_browsers | 255 return possible_browsers |
OLD | NEW |