Chromium Code Reviews| Index: LayoutTests/http/tests/inspector-protocol/resources/protocol-test.js |
| diff --git a/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.js b/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.js |
| index 2de96c86b8020f18b67749c281901750e08e2e78..81ebcc51abe5b96511ca8691c1376edf8ecff029 100644 |
| --- a/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.js |
| +++ b/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.js |
| @@ -22,8 +22,9 @@ |
| * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| -var outputElement; |
| +var outputElement; |
| +var dummyFrontendURL; |
| /** |
| * Logs message to process stdout via alert (hopefully implemented with immediate flush). |
| * @param {string} text |
| @@ -57,7 +58,7 @@ function log(text) |
| function closeTest() |
| { |
| - window.internals.closeDummyInspectorFrontend(); |
| + closeInspector(); |
| testRunner.notifyDone(); |
| } |
| @@ -81,8 +82,18 @@ function runTest() |
| } |
| } |
| - var url = scriptUrlBasePath + "/protocol-test.html"; |
| - var inspectorFrontend = window.internals.openDummyInspectorFrontend(url); |
| + dummyFrontendURL = scriptUrlBasePath + "/protocol-test.html"; |
| + openInspector(); |
| +} |
| + |
| +function closeInspector() |
| +{ |
| + window.internals.closeDummyInspectorFrontend(); |
| +} |
| + |
| +function openInspector() |
| +{ |
| + var inspectorFrontend = window.internals.openDummyInspectorFrontend(dummyFrontendURL); |
|
apavlov
2013/12/27 07:12:30
dummyFrontendURL could as well be an argument to o
yurys
2013/12/27 08:43:06
+1, please pass front-end URL as an explicit param
|
| inspectorFrontend.addEventListener("load", function(event) { |
| // FIXME: rename this 'test' global field across all tests. |
| var testFunction = window.test; |