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

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: wait for document ready state 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,20 @@
+# 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):
+ """Represents a an extension page in the browser"""
+ def __init__(self, context):
+ self._context = context
dtu 2013/01/30 00:01:49 Use a TabBackend instead of a Tab here. Call it se
achuithb 2013/01/30 10:01:56 Done.
+
+ def __enter__(self):
dtu 2013/01/30 00:01:49 Don't need enter and exit.
achuithb 2013/01/30 10:01:56 Done.
+ return self
+
+ def __exit__(self, *args):
+ self._context.Close()
+
+ def EvaluateJavaScript(self, expr, timeout=DEFAULT_EXTENSION_TIMEOUT):
dtu 2013/01/30 00:01:49 Also include ExecuteJavaScript.
achuithb 2013/01/30 10:01:56 Done.
+ self._context.WaitForDocumentReadyStateToBeInteractiveOrBetter()
dtu 2013/01/30 00:01:49 I think Waiting is the responsibility of the calle
achuithb 2013/01/30 10:01:56 Done.
+ return self._context.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