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..2d2bcb6249d0e38f358918e550a400d2f7942bab |
| --- /dev/null |
| +++ b/LayoutTests/inspector/sources/debugger/script-failed-to-parse.html |
| @@ -0,0 +1,38 @@ |
| +<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); |
| +} |
| + |
| +var test = function() |
|
aandrey
2014/07/07 19:44:31
nit: 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()"> |
|
aandrey
2014/07/07 19:44:31
<p>
Tests that...
</p>
|
| +</body> |
| +</html> |