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

Unified Diff: tools/telemetry/telemetry/click_to_navigate_interaction_unittest.py

Issue 11369075: Chrome remote control multipage tests: Add interactions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: code review (nduca) Created 8 years, 1 month 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/click_to_navigate_interaction_unittest.py
diff --git a/tools/telemetry/telemetry/click_to_navigate_interaction_unittest.py b/tools/telemetry/telemetry/click_to_navigate_interaction_unittest.py
new file mode 100644
index 0000000000000000000000000000000000000000..f631c2af860b5babe634823fc2729d579ccc4b62
--- /dev/null
+++ b/tools/telemetry/telemetry/click_to_navigate_interaction_unittest.py
@@ -0,0 +1,25 @@
+# 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 import click_to_navigate_interaction
+from telemetry import tab_test_case
+
+class ClickToNavigateInteractionTest(tab_test_case.TabTestCase):
+ def testClickToNavigateInteraction(self):
+ unittest_data_dir = os.path.join(os.path.dirname(__file__),
+ '..', 'unittest_data')
+ self._browser.SetHTTPServerDirectory(unittest_data_dir)
+ self._tab.page.Navigate(
+ self._browser.http_server.UrlOf('page_with_link.html'))
+ self._tab.WaitForDocumentReadyStateToBeComplete()
+ self.assertEquals(self._tab.runtime.Evaluate('document.location.pathname;'),
+ '/page_with_link.html')
+
+ data = {'selector': 'a[id="clickme"]'}
+ i = click_to_navigate_interaction.ClickToNavigateInteraction(data)
+ i.PerformInteraction({}, self._tab)
+
+ self.assertEquals(self._tab.runtime.Evaluate('document.location.pathname;'),
+ '/blank.html')
« no previous file with comments | « tools/telemetry/telemetry/click_to_navigate_interaction.py ('k') | tools/telemetry/telemetry/compound_interaction.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698