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

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

Issue 321253004: Kill wait_until support, which is unused once ClickElementAction is (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/javascript_click_unittest.py
diff --git a/tools/telemetry/telemetry/page/actions/javascript_click_unittest.py b/tools/telemetry/telemetry/page/actions/javascript_click_unittest.py
deleted file mode 100644
index fba168258a6504b67a4ce232223d7bbf19b7a8a8..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/page/actions/javascript_click_unittest.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from telemetry.page.actions import javascript_click
-from telemetry.page.actions import wait_until
-from telemetry.unittest import tab_test_case
-
-
-class ClickElementActionTest(tab_test_case.TabTestCase):
- def testClickWithSelectorWaitForNavigation(self):
- self.Navigate('page_with_link.html')
- self.assertEquals(
- self._tab.EvaluateJavaScript('document.location.pathname;'),
- '/page_with_link.html')
-
- data = {'selector': 'a[id="clickme"]'}
- i = javascript_click.ClickElementAction(data)
- data = {'condition': 'href_change'}
- j = wait_until.WaitUntil(i, data)
- j.RunActionAndWait(self._tab)
-
- self.assertEquals(
- self._tab.EvaluateJavaScript('document.location.pathname;'),
- '/blank.html')
-
- def testClickWithSingleQuoteSelectorWaitForNavigation(self):
- self.Navigate('page_with_link.html')
- self.assertEquals(
- self._tab.EvaluateJavaScript('document.location.pathname;'),
- '/page_with_link.html')
-
- data = {'selector': 'a[id=\'clickme\']'}
- i = javascript_click.ClickElementAction(data)
- data = {'condition': 'href_change'}
- j = wait_until.WaitUntil(i, data)
- j.RunActionAndWait(self._tab)
-
- self.assertEquals(
- self._tab.EvaluateJavaScript('document.location.pathname;'),
- '/blank.html')
-
- def testClickWithTextWaitForRefChange(self):
- self.Navigate('page_with_link.html')
- self.assertEquals(
- self._tab.EvaluateJavaScript('document.location.pathname;'),
- '/page_with_link.html')
-
- data = {'text': 'Click me'}
- i = javascript_click.ClickElementAction(data)
- data = {'condition': 'href_change'}
- j = wait_until.WaitUntil(i, data)
- j.RunActionAndWait(self._tab)
-
- self.assertEquals(
- self._tab.EvaluateJavaScript('document.location.pathname;'),
- '/blank.html')
-
- def testClickWithXPathWaitForRefChange(self):
- self.Navigate('page_with_link.html')
- self.assertEquals(
- self._tab.EvaluateJavaScript('document.location.pathname;'),
- '/page_with_link.html')
-
- data = {'xpath': '//a[@id="clickme"]'}
- i = javascript_click.ClickElementAction(data)
- data = {'condition': 'href_change'}
- j = wait_until.WaitUntil(i, data)
- j.RunActionAndWait(self._tab)
-
- self.assertEquals(
- self._tab.EvaluateJavaScript('document.location.pathname;'),
- '/blank.html')
« no previous file with comments | « tools/telemetry/telemetry/page/actions/gesture_action.py ('k') | tools/telemetry/telemetry/page/actions/page_action.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698