Chromium Code Reviews| 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 |