Chromium Code Reviews
|
| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 DEFAULT_EXTENSION_TIMEOUT = 60 | |
| 6 | |
| 7 class ExtensionPage(object): | |
| 8 """Represents a an extension page in the browser""" | |
| 9 def __init__(self, context): | |
| 10 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.
| |
| 11 | |
| 12 def __enter__(self): | |
|
dtu
2013/01/30 00:01:49
Don't need enter and exit.
achuithb
2013/01/30 10:01:56
Done.
| |
| 13 return self | |
| 14 | |
| 15 def __exit__(self, *args): | |
| 16 self._context.Close() | |
| 17 | |
| 18 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.
| |
| 19 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.
| |
| 20 return self._context.EvaluateJavaScript(expr, timeout) | |
| OLD | NEW |