Commit fc420e93 authored by ariblue's avatar ariblue Committed by Commit bot

Disable AndroidAppTest.testWebView.

BUG=452266

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

Cr-Commit-Position: refs/heads/master@{#314012}
parent 7a6ee3ff
...@@ -14,10 +14,6 @@ from telemetry.core.platform import android_device ...@@ -14,10 +14,6 @@ from telemetry.core.platform import android_device
from telemetry.unittest_util import options_for_unittests from telemetry.unittest_util import options_for_unittests
def _IsAppReady(app):
return len(app.GetProcess(':search').GetWebViews()) > 0
class AndroidAppTest(unittest.TestCase): class AndroidAppTest(unittest.TestCase):
def setUp(self): def setUp(self):
self._options = options_for_unittests.GetCopy() self._options = options_for_unittests.GetCopy()
...@@ -27,7 +23,7 @@ class AndroidAppTest(unittest.TestCase): ...@@ -27,7 +23,7 @@ class AndroidAppTest(unittest.TestCase):
platform = platform_module.GetPlatformForDevice(self._device, self._options) platform = platform_module.GetPlatformForDevice(self._device, self._options)
platform_backend = platform._platform_backend platform_backend = platform._platform_backend
app_backend = android_app_backend.AndroidAppBackend( app_backend = android_app_backend.AndroidAppBackend(
platform_backend, start_intent, is_app_ready_predicate=_IsAppReady) platform_backend, start_intent)
return android_app.AndroidApp(app_backend, platform_backend) return android_app.AndroidApp(app_backend, platform_backend)
def testWebView(self): def testWebView(self):
...@@ -43,6 +39,16 @@ class AndroidAppTest(unittest.TestCase): ...@@ -43,6 +39,16 @@ class AndroidAppTest(unittest.TestCase):
extras={'query': 'google'}, extras={'query': 'google'},
category=None) category=None)
search_app = self.CreateAndroidApp(start_intent) search_app = self.CreateAndroidApp(start_intent)
search_process = search_app.GetProcess(':search')
search_process._UpdateDevToolsClient()
# TODO(ariblue): Replace the app used in this test with one in which the
# setWebContentsDebuggingEnabled method is called on the WebView class.
# This will configure webviews for debugging with chrome devtools inspector
# and allow us to remove this check.
if search_process._devtools_client is None:
return
webview = search_app.GetProcess(':search').GetWebViews().pop() webview = search_app.GetProcess(':search').GetWebViews().pop()
webview.Navigate('https://www.google.com/search?q=flowers') webview.Navigate('https://www.google.com/search?q=flowers')
time.sleep(5) time.sleep(5)
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