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

Unified Diff: tools/telemetry/telemetry/page_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/page_interaction.py
diff --git a/tools/telemetry/telemetry/page_interaction.py b/tools/telemetry/telemetry/page_interaction.py
new file mode 100644
index 0000000000000000000000000000000000000000..108db761b78aecc01e142439254a6fc341209bde
--- /dev/null
+++ b/tools/telemetry/telemetry/page_interaction.py
@@ -0,0 +1,37 @@
+# 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 PageInteractionNotSupported(Exception):
+ pass
+
+class PageInteractionFailed(Exception):
+ pass
+
+class PageInteraction(object):
+ """Represents an interaction that a user might try to perform to a page."""
+ def __init__(self, attributes=None):
+ if attributes:
+ for k, v in attributes.iteritems():
+ setattr(self, k, v)
+
+ def CustomizeBrowserOptions(self, options):
+ """Override to add test-specific options to the BrowserOptions object"""
+ pass
+
+ def PerformInteraction(self, page, tab):
+ raise NotImplementedError()
+
+ def CleanUp(self, page, tab):
+ pass
+
+_page_interaction_classes = {}
+def GetAllClasses():
+ return list(_page_interaction_classes.values())
+
+def FindClassWithName(name):
+ return _page_interaction_classes.get(name)
+
+def RegisterClass(name, interaction_class):
+ assert name not in _page_interaction_classes
+ _page_interaction_classes[name] = interaction_class
« no previous file with comments | « tools/telemetry/telemetry/inspector_page_unittest.py ('k') | tools/telemetry/unittest_data/page_with_link.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698