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

Unified Diff: tools/telemetry/telemetry/extension_page.py

Issue 11882033: Telemetry support for extensions. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 7 years, 11 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/telemetry/telemetry/extension_page.py
===================================================================
--- tools/telemetry/telemetry/extension_page.py (revision 0)
+++ tools/telemetry/telemetry/extension_page.py (revision 0)
@@ -0,0 +1,21 @@
+# 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.
+
+DEFAULT_EXTENSION_TIMEOUT = 60
+
+class ExtensionPage(object):
nduca 2013/02/01 00:25:50 Do we need a followup crbug for using a base class
achuithb 2013/02/06 00:23:03 Done.
+ """Represents a an extension page in the browser"""
+ def __init__(self, inspector_backend):
+ self._inspector_backend = inspector_backend
+
+ def WaitForDocumentReadyStateToBeInteractiveOrBetter(self,
nduca 2013/02/01 00:25:50 You dont have docstrings on this. Bad. Followup bu
achuithb 2013/02/06 00:23:03 Done.
+ timeout=DEFAULT_EXTENSION_TIMEOUT):
+ self._inspector_backend.WaitForDocumentReadyStateToBeInteractiveOrBetter(
+ timeout)
+
+ def ExecuteJavaScript(self, expr, timeout=DEFAULT_EXTENSION_TIMEOUT):
nduca 2013/02/01 00:25:50 yeah i really would like a base class. I'm sorry.
achuithb 2013/02/06 00:23:03 Done.
+ self._inspector_backend.ExecuteJavaScript(expr, timeout)
+
+ def EvaluateJavaScript(self, expr, timeout=DEFAULT_EXTENSION_TIMEOUT):
+ return self._inspector_backend.EvaluateJavaScript(expr, timeout)
Property changes on: tools/telemetry/telemetry/extension_page.py
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698