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

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

Issue 22883011: Removing Page.WaitToLoad and update all pagesets to use explicit wait actions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Putting default navigate_steps inside page_set rather than page Created 7 years, 4 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/click_element_unittest.py
diff --git a/tools/telemetry/telemetry/page/actions/click_element_unittest.py b/tools/telemetry/telemetry/page/actions/click_element_unittest.py
index c50d8c96de5311d8cd881e2c0eefa0aa8f373701..2665c7de248261996355382768b16c2dfdfa2c8f 100644
--- a/tools/telemetry/telemetry/page/actions/click_element_unittest.py
+++ b/tools/telemetry/telemetry/page/actions/click_element_unittest.py
@@ -4,6 +4,7 @@
from telemetry.core import util
from telemetry.page.actions import click_element
+from telemetry.page.actions import wait
from telemetry.unittest import tab_test_case
class ClickElementActionTest(tab_test_case.TabTestCase):
@@ -16,9 +17,11 @@ class ClickElementActionTest(tab_test_case.TabTestCase):
self._tab.EvaluateJavaScript('document.location.pathname;'),
'/page_with_link.html')
- data = {'selector': 'a[id="clickme"]', 'wait_for_href_change': True}
+ data = {'selector': 'a[id="clickme"]'}
i = click_element.ClickElementAction(data)
- i.RunAction(None, self._tab, None)
+ data = {'condition': 'href_change'}
+ j = wait.WaitAction(data)
+ j.RunAction(None, self._tab, i)
self.assertEquals(
self._tab.EvaluateJavaScript('document.location.pathname;'),
@@ -33,9 +36,11 @@ class ClickElementActionTest(tab_test_case.TabTestCase):
self._tab.EvaluateJavaScript('document.location.pathname;'),
'/page_with_link.html')
- data = {'text': 'Click me', 'wait_for_href_change': True}
+ data = {'text': 'Click me'}
i = click_element.ClickElementAction(data)
- i.RunAction(None, self._tab, None)
+ data = {'condition': 'href_change'}
+ j = wait.WaitAction(data)
+ j.RunAction(None, self._tab, i)
self.assertEquals(
self._tab.EvaluateJavaScript('document.location.pathname;'),
« no previous file with comments | « tools/telemetry/telemetry/page/actions/click_element.py ('k') | tools/telemetry/telemetry/page/actions/reload.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698