Commit 8d9f0ee4 authored by sievers's avatar sievers Committed by Commit bot

android: Add browser type for webview shell to telemetry

This adds a browser type 'android-webview-shell' for the test
shell activity (AndroidWebView.apk), which is different from the existing
'android-webview' target that uses the device's system WebView for
testing.

Review URL: https://codereview.chromium.org/517573004

Cr-Commit-Position: refs/heads/master@{#292734}
parent d7929e7e
...@@ -133,12 +133,12 @@ class ChromeShellBackendSettings(AndroidBrowserBackendSettings): ...@@ -133,12 +133,12 @@ class ChromeShellBackendSettings(AndroidBrowserBackendSettings):
def GetDevtoolsRemotePort(self): def GetDevtoolsRemotePort(self):
return 'localabstract:chrome_shell_devtools_remote' return 'localabstract:chrome_shell_devtools_remote'
class WebviewBackendSettings(AndroidBrowserBackendSettings): class WebviewBackendSettings(AndroidBrowserBackendSettings):
def __init__(self, adb, package): def __init__(self, adb, package,
activity='org.chromium.telemetry_shell.TelemetryActivity'):
super(WebviewBackendSettings, self).__init__( super(WebviewBackendSettings, self).__init__(
adb=adb, adb=adb,
activity='org.chromium.telemetry_shell.TelemetryActivity', activity=activity,
cmdline_file='/data/local/tmp/webview-command-line', cmdline_file='/data/local/tmp/webview-command-line',
package=package, package=package,
pseudo_exec_name='webview', pseudo_exec_name='webview',
...@@ -166,6 +166,12 @@ class WebviewBackendSettings(AndroidBrowserBackendSettings): ...@@ -166,6 +166,12 @@ class WebviewBackendSettings(AndroidBrowserBackendSettings):
'Timeout waiting for PID.') 'Timeout waiting for PID.')
return 'localabstract:webview_devtools_remote_%s' % str(pid) return 'localabstract:webview_devtools_remote_%s' % str(pid)
class WebviewShellBackendSettings(WebviewBackendSettings):
def __init__(self, adb, package):
super(WebviewShellBackendSettings, self).__init__(
adb=adb,
activity='org.chromium.android_webview.shell.AwShellActivity',
package=package)
class AndroidBrowserBackend(chrome_browser_backend.ChromeBrowserBackend): class AndroidBrowserBackend(chrome_browser_backend.ChromeBrowserBackend):
"""The backend for controlling a browser instance running on Android.""" """The backend for controlling a browser instance running on Android."""
......
...@@ -39,6 +39,10 @@ CHROME_PACKAGE_NAMES = { ...@@ -39,6 +39,10 @@ CHROME_PACKAGE_NAMES = {
['org.chromium.telemetry_shell', ['org.chromium.telemetry_shell',
android_browser_backend.WebviewBackendSettings, android_browser_backend.WebviewBackendSettings,
None], None],
'android-webview-shell':
['org.chromium.android_webview.shell',
android_browser_backend.WebviewShellBackendSettings,
'AndroidWebView.apk'],
'android-chrome': 'android-chrome':
['com.google.android.apps.chrome', ['com.google.android.apps.chrome',
android_browser_backend.ChromeBackendSettings, android_browser_backend.ChromeBackendSettings,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment