| OLD | NEW |
| (Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 5 <script> |
| 6 function addScript(url) |
| 7 { |
| 8 var head = document.getElementsByTagName('head')[0]; |
| 9 var script = document.createElement('script'); |
| 10 script.setAttribute('src', url); |
| 11 head.appendChild(script); |
| 12 } |
| 13 |
| 14 function test() |
| 15 { |
| 16 InspectorTest.runDebuggerTestSuite([ |
| 17 function testScriptParsedEvent(next) |
| 18 { |
| 19 WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerMod
el.Events.FailedToParseScriptSource, scriptFailedToParse); |
| 20 InspectorTest.evaluateInPage("addScript('resources/script-failed-to-
parse.js')"); |
| 21 |
| 22 function scriptFailedToParse(event) |
| 23 { |
| 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.j
s received"); |
| 27 WebInspector.debuggerModel.removeEventListener(WebInspector.
DebuggerModel.Events.FailedToParseScriptSource, scriptFailedToParse); |
| 28 next(); |
| 29 } |
| 30 } |
| 31 }, |
| 32 ]); |
| 33 } |
| 34 </script> |
| 35 </head> |
| 36 <body onload="runTest()"> |
| 37 <p> |
| 38 Tests that FailedToParseScriptSource event is raised after compile script with s
yntax error. |
| 39 </p> |
| 40 </body> |
| 41 </html> |
| OLD | NEW |