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

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

Issue 11114020: [chrome-remote-control] Interaction objects separate measurement/test code from page scrolling/drag… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months 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/let_it_run_interaction.py
diff --git a/tools/chrome_remote_control/chrome_remote_control/let_it_run_interaction.py b/tools/chrome_remote_control/chrome_remote_control/let_it_run_interaction.py
new file mode 100644
index 0000000000000000000000000000000000000000..643cf8096787be80ce3bad7392c2ae3f76ba3fb7
--- /dev/null
+++ b/tools/chrome_remote_control/chrome_remote_control/let_it_run_interaction.py
@@ -0,0 +1,22 @@
+# 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 time
+
+from chrome_remote_control import interaction
+
+class LetItRunInteraction(interaction.Interaction):
+ def SupportedForPage(self, page, tab):
+ if page.let_it_run_time_in_seconds == None:
+ raise interaction.InteractionNotSupported(
+ 'Page %s must specify let_it_run_time_in_seconds' % str(page))
+
+ def PerformInteraction(self, page, tab, test):
+ test.WillPerformInteraction(self, page, tab)
+ time.sleep(page.let_it_run_time_in_seconds)
+ test.DidPerformInteraction(self, page, tab)
+
+ def CleanUp(self, page, tab):
+ pass
+
+interaction.RegisterClass('let_it_run', LetItRunInteraction)

Powered by Google App Engine
This is Rietveld 408576698