| Index: tools/telemetry/telemetry/page/click_element_action_unittest.py
|
| ===================================================================
|
| --- tools/telemetry/telemetry/page/click_element_action_unittest.py (revision 182999)
|
| +++ tools/telemetry/telemetry/page/click_element_action_unittest.py (working copy)
|
| @@ -1,46 +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.
|
| -import os
|
| -
|
| -from telemetry.page import click_element_action
|
| -from telemetry.test import tab_test_case
|
| -
|
| -class ClickElementActionTest(tab_test_case.TabTestCase):
|
| - def testClickWithSelectorWaitForNavigation(self):
|
| - unittest_data_dir = os.path.join(os.path.dirname(__file__),
|
| - '..', '..', 'unittest_data')
|
| - self._browser.SetHTTPServerDirectory(unittest_data_dir)
|
| - self._tab.Navigate(
|
| - self._browser.http_server.UrlOf('page_with_link.html'))
|
| - self._tab.WaitForDocumentReadyStateToBeComplete()
|
| - self.assertEquals(
|
| - self._tab.EvaluateJavaScript('document.location.pathname;'),
|
| - '/page_with_link.html')
|
| -
|
| - data = {'selector': 'a[id="clickme"]', 'wait_for_navigation': True}
|
| - i = click_element_action.ClickElementAction(data)
|
| - i.RunAction(None, self._tab, None)
|
| -
|
| - self.assertEquals(
|
| - self._tab.EvaluateJavaScript('document.location.pathname;'),
|
| - '/blank.html')
|
| -
|
| - def testClickWithTextWaitForRefChange(self):
|
| - unittest_data_dir = os.path.join(os.path.dirname(__file__),
|
| - '..', '..', 'unittest_data')
|
| - self._browser.SetHTTPServerDirectory(unittest_data_dir)
|
| - self._tab.Navigate(
|
| - self._browser.http_server.UrlOf('page_with_link.html'))
|
| - self._tab.WaitForDocumentReadyStateToBeComplete()
|
| - self.assertEquals(
|
| - self._tab.EvaluateJavaScript('document.location.pathname;'),
|
| - '/page_with_link.html')
|
| -
|
| - data = {'text': 'Click me', 'wait_for_href_change': True}
|
| - i = click_element_action.ClickElementAction(data)
|
| - i.RunAction(None, self._tab, None)
|
| -
|
| - self.assertEquals(
|
| - self._tab.EvaluateJavaScript('document.location.pathname;'),
|
| - '/blank.html')
|
|
|