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

Unified Diff: telemetry/telemetry/internal/browser/web_contents.py

Issue 2661683002: [Telemetry] Add web_contents.WaitForJavaScriptCondition method (Closed)
Patch Set: Created 3 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: telemetry/telemetry/internal/browser/web_contents.py
diff --git a/telemetry/telemetry/internal/browser/web_contents.py b/telemetry/telemetry/internal/browser/web_contents.py
index 12e7b171df4f688b50a80d2d3356510e70654a9a..ef0017c9f41681eef632514d3b61c76c7b44bcb6 100644
--- a/telemetry/telemetry/internal/browser/web_contents.py
+++ b/telemetry/telemetry/internal/browser/web_contents.py
@@ -174,6 +174,16 @@ class WebContents(object):
"""
return self._inspector_backend.EvaluateJavaScript2(*args, **kwargs)
+ def WaitForJavaScriptCondition(self, expr, timeout=None):
+ """Method made available to ease the migration of ChromeOS clients.
+
+ Chromium/catapult clients should use WaitForJavaScriptCondition2
+ until the process of migration is over.
+
+ See: crbug.com/682812, catapult:#3028.
+ """
+ self._inspector_backend.WaitForJavaScriptCondition2(expr, timeout=timeout)
+
def WaitForJavaScriptCondition2(self, *args, **kwargs):
"""Wait for a JavaScript condition to become true.
« 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