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

Unified Diff: tools/telemetry/telemetry/core/backends/chrome/oobe.py

Issue 1100763002: Inject CanAddURLToHistory into TopSitesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs
Patch Set: Fix error introduced during rebase Created 5 years, 8 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
Index: tools/telemetry/telemetry/core/backends/chrome/oobe.py
diff --git a/tools/telemetry/telemetry/core/backends/chrome/oobe.py b/tools/telemetry/telemetry/core/backends/chrome/oobe.py
index 51d7dac489d7ab08a4c8f271ba15e421dd50f126..16bb89c9e9c4a70eb181d2484a0332e35c016bad 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/oobe.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/oobe.py
@@ -91,7 +91,11 @@ class Oobe(web_contents.WebContents):
def _NavigateWebViewLogin(self, username, password):
"""Logs into the webview-based GAIA screen"""
self._NavigateWebViewEntry('identifierId', username)
+ self._GaiaWebViewContext().WaitForJavaScriptExpression(
+ "document.getElementById('identifierId') == null", 20)
+
self._NavigateWebViewEntry('password', password)
+ util.WaitFor(lambda: self._GaiaWebViewContext() == None, 20)
def _NavigateWebViewEntry(self, field, value):
self._WaitForField(field)
@@ -101,8 +105,6 @@ class Oobe(web_contents.WebContents):
document.getElementById('%s').value='%s';
document.getElementById('next').click()"""
% (field, value))
- gaia_webview_context.WaitForJavaScriptExpression(
- "document.getElementById('%s') == null" % field, 20)
def _WaitForField(self, field_id):
gaia_webview_context = util.WaitFor(self._GaiaWebViewContext, 5)
« no previous file with comments | « tools/perf/benchmarks/smoothness.py ('k') | tools/telemetry/telemetry/core/platform/android_platform_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698