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

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

Issue 317913003: Remove 'navigate' attribute from wait_until (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 6 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/page/actions/action_runner_unittest.py
diff --git a/tools/telemetry/telemetry/page/actions/action_runner_unittest.py b/tools/telemetry/telemetry/page/actions/action_runner_unittest.py
index 827609701ee97297a60b4b78b56e91c7f00bd336..0920194cf242f1551a0735935803b41358f026ab 100644
--- a/tools/telemetry/telemetry/page/actions/action_runner_unittest.py
+++ b/tools/telemetry/telemetry/page/actions/action_runner_unittest.py
@@ -40,3 +40,16 @@ class ActionRunnerTest(tab_test_case.TabTestCase):
self.Navigate('blank.html')
action_runner.ExecuteJavaScript('var testing = 42;')
self.assertEqual(42, self._tab.EvaluateJavaScript('testing'))
+
+ def testWaitForNavigate(self):
+ self.Navigate('page_with_link.html')
+ action_runner = action_runner_module.ActionRunner(self._tab)
+ action_runner.RunAction(ClickElementAction({'xpath': 'id("clickme")'}))
+ action_runner.WaitForNavigate()
+
+ self.assertTrue(self._tab.EvaluateJavaScript(
+ 'document.readyState == "interactive" || '
+ 'document.readyState == "complete"'))
+ self.assertEquals(
+ self._tab.EvaluateJavaScript('document.location.pathname;'),
+ '/blank.html')
« no previous file with comments | « tools/telemetry/telemetry/page/actions/action_runner.py ('k') | tools/telemetry/telemetry/page/actions/wait_until.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698