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

Unified Diff: tools/telemetry/telemetry/click_to_navigate_interaction.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.py
diff --git a/tools/telemetry/telemetry/click_to_navigate_interaction.py b/tools/telemetry/telemetry/click_to_navigate_interaction.py
new file mode 100644
index 0000000000000000000000000000000000000000..0360fd85cf3392d3636ac5cc511565b9e59f7fc5
--- /dev/null
+++ b/tools/telemetry/telemetry/click_to_navigate_interaction.py
@@ -0,0 +1,18 @@
+# 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 import page_interaction
+
+class ClickToNavigateInteraction(page_interaction.PageInteraction):
+ def __init__(self, attributes=None):
+ super(ClickToNavigateInteraction, self).__init__(attributes)
+
+ def PerformInteraction(self, page, tab):
+ assert self.selector
+ code = 'document.querySelector(\'' + self.selector + '\').click();'
+ def DoClick():
+ tab.runtime.Execute(code)
+ tab.page.PerformActionAndWaitForNavigate(DoClick)
+
+
+page_interaction.RegisterClass('click_to_navigate', ClickToNavigateInteraction)
« no previous file with comments | « tools/perf/page_sets/top_25.json ('k') | tools/telemetry/telemetry/click_to_navigate_interaction_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698