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

Unified Diff: tools/telemetry/telemetry/page/actions/wait_until.py

Issue 277143003: Add NavigateToPage API for action_runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 7 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 | « tools/telemetry/telemetry/page/actions/wait_unittest.py ('k') | tools/telemetry/telemetry/page/page.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/page/actions/wait_until.py
diff --git a/tools/telemetry/telemetry/page/actions/wait_until.py b/tools/telemetry/telemetry/page/actions/wait_until.py
index 559e62ca639742ee51e8cd4562299c41e6b75f17..f50a810c66ec189f3faeb5af57139cc08ca8d2fa 100644
--- a/tools/telemetry/telemetry/page/actions/wait_until.py
+++ b/tools/telemetry/telemetry/page/actions/wait_until.py
@@ -12,17 +12,16 @@ class WaitUntil(object):
setattr(self, k, v)
self._previous_action = previous_action
- def RunActionAndWait(self, page, tab):
+ def RunActionAndWait(self, tab):
if getattr(self, 'condition', None) == 'navigate':
- self._previous_action.WillRunAction(page, tab)
- action_to_perform = lambda: self._previous_action.RunAction(page, tab)
+ self._previous_action.WillRunAction(tab)
+ action_to_perform = lambda: self._previous_action.RunAction(tab)
tab.PerformActionAndWaitForNavigate(action_to_perform, self.timeout)
tab.WaitForDocumentReadyStateToBeInteractiveOrBetter()
elif getattr(self, 'condition', None) == 'href_change':
- self._previous_action.WillRunAction(page, tab)
+ self._previous_action.WillRunAction(tab)
old_url = tab.EvaluateJavaScript('document.location.href')
- self._previous_action.RunAction(page, tab)
+ self._previous_action.RunAction(tab)
tab.WaitForJavaScriptExpression(
'document.location.href != "%s"' % old_url, self.timeout)
-
« no previous file with comments | « tools/telemetry/telemetry/page/actions/wait_unittest.py ('k') | tools/telemetry/telemetry/page/page.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698