Chromium Code Reviews| 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 src="resources/script-failed-to-parse.js"></script> | |
| 6 <script> | |
| 7 | |
| 8 var test = function() | |
| 9 { | |
| 10 InspectorTest.runDebuggerTestSuite([ | |
| 11 function testOpenDevToolsThenReload(next) | |
| 12 { | |
| 13 WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerMod el.Events.ParsedScriptSource, scriptParsed); | |
| 14 InspectorTest.addResult("Reloading page."); | |
| 15 InspectorTest.reloadPage(onPageReloaded); | |
| 16 | |
| 17 var eventsCountBeforeNext = 2; | |
| 18 function onPageReloaded() | |
|
vsevik
2014/07/02 15:06:42
You don't need this, any ParsedScriptSource with t
| |
| 19 { | |
| 20 if (!--eventsCountBeforeNext) | |
| 21 next(); | |
| 22 } | |
| 23 | |
| 24 function scriptParsed(event) | |
| 25 { | |
| 26 var script = event.data; | |
| 27 if (script.sourceURL.indexOf("script-failed-to-parse.js") !== -1 ) { | |
| 28 InspectorTest.addResult("Event with script-failed-to-par se recevied"); | |
| 29 WebInspector.debuggerModel.removeEventListener(WebInspector. DebuggerModel.Events.ParsedScriptSource, scriptParsed); | |
| 30 if (!--eventsCountBeforeNext) | |
| 31 next(); | |
| 32 } | |
| 33 } | |
| 34 }, | |
| 35 ]); | |
| 36 } | |
| 37 </script> | |
| 38 </head> | |
| 39 <body onload="runTest()"> | |
| 40 </body> | |
| 41 </html> | |
| OLD | NEW |