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

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

Issue 11273081: Adding a test for measuring memory usage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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
« no previous file with comments | « no previous file | tools/chrome_remote_control/chrome_remote_control/page_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/chrome_remote_control/chrome_remote_control/interaction.py
diff --git a/tools/chrome_remote_control/chrome_remote_control/interaction.py b/tools/chrome_remote_control/chrome_remote_control/interaction.py
new file mode 100644
index 0000000000000000000000000000000000000000..bfd260c69d6d46bb42fedee89d69b1c60bd3d346
--- /dev/null
+++ b/tools/chrome_remote_control/chrome_remote_control/interaction.py
@@ -0,0 +1,35 @@
+# 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.
+class InteractionNotSupported(Exception):
+ pass
+
+class InteractionFailed(Exception):
+ pass
+
+class Interaction(object):
+ """Represents an interaction that a user might try to perform to a page."""
+
+ def CustomizeBrowserOptions(self, options):
+ """Override to add test-specific options to the BrowserOptions object"""
+ pass
+
+ def SupportedForPage(self, page, tab):
+ raise NotImplementedError()
+
+ def PerformInteraction(self, page, tab, test):
+ raise NotImplementedError()
+
+ def CleanUp(self, page, tab):
+ raise NotImplementedError()
+
+_interaction_classes = {}
tonyg 2012/11/02 18:57:34 nit: line break after this
+def GetAllClasses():
+ return list(_interaction_classes.values())
+
+def FindClassWithName(name):
+ return _interaction_classes.get(name)
+
+def RegisterClass(name, interaction_class):
+ assert name not in _interaction_classes
+ _interaction_classes[name] = interaction_class
« no previous file with comments | « no previous file | tools/chrome_remote_control/chrome_remote_control/page_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698