3 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../../http/tests/inspector/debugger-test.js"></script>
6 function addScript(url
)
8 var head
= document
.getElementsByTagName('head')[0];
9 var script
= document
.createElement('script');
10 script
.setAttribute('src', url
);
11 head
.appendChild(script
);
16 InspectorTest
.runDebuggerTestSuite([
17 function testScriptParsedEvent(next
)
19 InspectorTest
.debuggerModel
.addEventListener(WebInspector
.DebuggerModel
.Events
.FailedToParseScriptSource
, scriptFailedToParse
);
20 InspectorTest
.evaluateInPage("addScript('resources/script-failed-to-parse.js')");
22 function scriptFailedToParse(event
)
24 var script
= event
.data
;
25 if (script
.sourceURL
.indexOf("script-failed-to-parse.js") !== -1) {
26 InspectorTest
.addResult("Event with script-failed-to-parse.js received");
27 InspectorTest
.debuggerModel
.removeEventListener(WebInspector
.DebuggerModel
.Events
.FailedToParseScriptSource
, scriptFailedToParse
);
36 <body onload=
"runTest()">
38 Tests that FailedToParseScriptSource event is raised after compile script with syntax error.