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

Unified Diff: tools/telemetry/telemetry/core/android_app_unittest.py

Issue 887763003: Disable AndroidAppTest.testWebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/android_app_unittest.py
diff --git a/tools/telemetry/telemetry/core/android_app_unittest.py b/tools/telemetry/telemetry/core/android_app_unittest.py
index 64f50c5d34ac4360ca099ef8e60090b58ab0c78e..25d7aa269901e2ae93bec09dc5cdf7029f7bc2ac 100644
--- a/tools/telemetry/telemetry/core/android_app_unittest.py
+++ b/tools/telemetry/telemetry/core/android_app_unittest.py
@@ -14,10 +14,6 @@ from telemetry.core.platform import android_device
from telemetry.unittest_util import options_for_unittests
-def _IsAppReady(app):
- return len(app.GetProcess(':search').GetWebViews()) > 0
-
-
class AndroidAppTest(unittest.TestCase):
def setUp(self):
self._options = options_for_unittests.GetCopy()
@@ -27,7 +23,7 @@ class AndroidAppTest(unittest.TestCase):
platform = platform_module.GetPlatformForDevice(self._device, self._options)
platform_backend = platform._platform_backend
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)
def testWebView(self):
@@ -43,6 +39,16 @@ class AndroidAppTest(unittest.TestCase):
extras={'query': 'google'},
category=None)
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.Navigate('https://www.google.com/search?q=flowers')
time.sleep(5)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698