OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 import os | 4 import os |
5 | 5 |
6 from telemetry import click_element_action | 6 from telemetry import click_element_action |
7 from telemetry import tab_test_case | 7 from telemetry import tab_test_case |
8 | 8 |
9 class ClickElementActionTest(tab_test_case.TabTestCase): | 9 class ClickElementActionTest(tab_test_case.TabTestCase): |
10 def testClickWithSelectorWaitForNavigation(self): | 10 def testClickWithSelectorWaitForNavigation(self): |
(...skipping 26 matching lines...) Expand all Loading... |
37 self._tab.EvaluateJavaScript('document.location.pathname;'), | 37 self._tab.EvaluateJavaScript('document.location.pathname;'), |
38 '/page_with_link.html') | 38 '/page_with_link.html') |
39 | 39 |
40 data = {'text': 'Click me', 'wait_for_href_change': True} | 40 data = {'text': 'Click me', 'wait_for_href_change': True} |
41 i = click_element_action.ClickElementAction(data) | 41 i = click_element_action.ClickElementAction(data) |
42 i.RunAction(None, self._tab, None) | 42 i.RunAction(None, self._tab, None) |
43 | 43 |
44 self.assertEquals( | 44 self.assertEquals( |
45 self._tab.EvaluateJavaScript('document.location.pathname;'), | 45 self._tab.EvaluateJavaScript('document.location.pathname;'), |
46 '/blank.html') | 46 '/blank.html') |
OLD | NEW |