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

Unified Diff: tools/chrome_remote_control/chrome_remote_control/click_element_interaction.py

Issue 11369075: Chrome remote control multipage tests: Add interactions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: refactoring; add click_element.py, and js runner superclass for interactions. 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/chrome_remote_control/chrome_remote_control/click_element_interaction.py
diff --git a/tools/chrome_remote_control/chrome_remote_control/click_element_interaction.py b/tools/chrome_remote_control/chrome_remote_control/click_element_interaction.py
new file mode 100644
index 0000000000000000000000000000000000000000..6f5c2ddf07756931ec3d857c4d6f4250dfb2a501
--- /dev/null
+++ b/tools/chrome_remote_control/chrome_remote_control/click_element_interaction.py
@@ -0,0 +1,23 @@
+# 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 chrome_remote_control import javascript_runner_interaction
+from chrome_remote_control import page_interaction
+
+class ClickElementInteraction(
+ javascript_runner_interaction.JavaScriptRunnerInteraction):
nduca 2012/11/07 04:13:49 how about movign these to interaction.py but as me
marja 2012/11/07 10:52:27 This is removed for now (I can add it in the next
+ def __init__(self, data):
+ super(ClickElementInteraction, self).__init__(
+ "click_element.js", "clickElement", data)
+
+ def PerformInteraction(self, page, tab, test):
+ test.WillPerformInteraction(self, page, tab)
nduca 2012/11/07 04:13:49 I think the runner should call this, not the inter
marja 2012/11/07 10:52:27 Done. (This pattern was adopted from your CL, http
+
+ def DoClick():
+ self.InjectCode(tab)
nduca 2012/11/07 04:13:49 self.InjectodeIfNeeded(tab, "click_element.js") W
marja 2012/11/07 10:52:27 This code is now removed.
+ self.MakeJSCall(tab)
+ tab.page.PerformActionAndWaitForNavigate(DoClick)
+
+ test.DidPerformInteraction(self, page, tab)
+
+page_interaction.RegisterClass('click_element', ClickElementInteraction)

Powered by Google App Engine
This is Rietveld 408576698