| Index: LayoutTests/inspector/sources/debugger/script-failed-to-parse.html
|
| diff --git a/LayoutTests/inspector/sources/debugger/script-failed-to-parse.html b/LayoutTests/inspector/sources/debugger/script-failed-to-parse.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..88d56f01083fbe3a3b95349beabe72d8dd56b73c
|
| --- /dev/null
|
| +++ b/LayoutTests/inspector/sources/debugger/script-failed-to-parse.html
|
| @@ -0,0 +1,41 @@
|
| +<html>
|
| +<head>
|
| +<script src="../../../http/tests/inspector/inspector-test.js"></script>
|
| +<script src="../../../http/tests/inspector/debugger-test.js"></script>
|
| +<script>
|
| +function addScript(url)
|
| +{
|
| + var head = document.getElementsByTagName('head')[0];
|
| + var script = document.createElement('script');
|
| + script.setAttribute('src', url);
|
| + head.appendChild(script);
|
| +}
|
| +
|
| +function test()
|
| +{
|
| + InspectorTest.runDebuggerTestSuite([
|
| + function testScriptParsedEvent(next)
|
| + {
|
| + WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.FailedToParseScriptSource, scriptFailedToParse);
|
| + InspectorTest.evaluateInPage("addScript('resources/script-failed-to-parse.js')");
|
| +
|
| + function scriptFailedToParse(event)
|
| + {
|
| + var script = event.data;
|
| + if (script.sourceURL.indexOf("script-failed-to-parse.js") !== -1) {
|
| + InspectorTest.addResult("Event with script-failed-to-parse.js received");
|
| + WebInspector.debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.FailedToParseScriptSource, scriptFailedToParse);
|
| + next();
|
| + }
|
| + }
|
| + },
|
| + ]);
|
| +}
|
| +</script>
|
| +</head>
|
| +<body onload="runTest()">
|
| +<p>
|
| +Tests that FailedToParseScriptSource event is raised after compile script with syntax error.
|
| +</p>
|
| +</body>
|
| +</html>
|
|
|