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

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

Issue 181483002: Telemetry: Clean up tap and click_element gestures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 9 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
deleted file mode 100644
index 742c5ff26a1b55d0ac8258d6eefdb101c22a5ee0..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/page/actions/click_element_unittest.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright (c) 2012 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 click_element
-from telemetry.page.actions import wait
-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 = click_element.ClickElementAction(data)
- data = {'condition': 'href_change'}
- j = wait.WaitAction(data)
- j.RunAction(None, self._tab, i)
-
- 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 = click_element.ClickElementAction(data)
- data = {'condition': 'href_change'}
- j = wait.WaitAction(data)
- j.RunAction(None, self._tab, i)
-
- 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 = click_element.ClickElementAction(data)
- data = {'condition': 'href_change'}
- j = wait.WaitAction(data)
- j.RunAction(None, self._tab, i)
-
- 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 = click_element.ClickElementAction(data)
- data = {'condition': 'href_change'}
- j = wait.WaitAction(data)
- j.RunAction(None, self._tab, i)
-
- self.assertEquals(
- self._tab.EvaluateJavaScript('document.location.pathname;'),
- '/blank.html')
« no previous file with comments | « tools/telemetry/telemetry/page/actions/click_element.py ('k') | tools/telemetry/telemetry/page/actions/javascript_click.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698