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

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

Issue 880423002: add is_app_ready_predicate to testWebView in AndroidAppTest (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 4b2af1a02b0f60c68f0a8a8a95d045287e328149..64f50c5d34ac4360ca099ef8e60090b58ab0c78e 100644
--- a/tools/telemetry/telemetry/core/android_app_unittest.py
+++ b/tools/telemetry/telemetry/core/android_app_unittest.py
@@ -14,6 +14,10 @@ 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()
@@ -23,7 +27,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)
+ platform_backend, start_intent, is_app_ready_predicate=_IsAppReady)
return android_app.AndroidApp(app_backend, platform_backend)
def testWebView(self):
« 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