Chromium Code Reviews| 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..2b959db72b093dd233fa851412666edde4242099 |
| --- /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 src="resources/script-failed-to-parse.js"></script> |
| +<script> |
| + |
| +var test = function() |
| +{ |
| + InspectorTest.runDebuggerTestSuite([ |
| + function testOpenDevToolsThenReload(next) |
| + { |
| + WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.ParsedScriptSource, scriptParsed); |
| + InspectorTest.addResult("Reloading page."); |
| + InspectorTest.reloadPage(onPageReloaded); |
| + |
| + var eventsCountBeforeNext = 2; |
| + function onPageReloaded() |
|
vsevik
2014/07/02 15:06:42
You don't need this, any ParsedScriptSource with t
|
| + { |
| + if (!--eventsCountBeforeNext) |
| + next(); |
| + } |
| + |
| + function scriptParsed(event) |
| + { |
| + var script = event.data; |
| + if (script.sourceURL.indexOf("script-failed-to-parse.js") !== -1) { |
| + InspectorTest.addResult("Event with script-failed-to-parse recevied"); |
| + WebInspector.debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.ParsedScriptSource, scriptParsed); |
| + if (!--eventsCountBeforeNext) |
| + next(); |
| + } |
| + } |
| + }, |
| + ]); |
| +} |
| +</script> |
| +</head> |
| +<body onload="runTest()"> |
| +</body> |
| +</html> |