Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: LayoutTests/inspector/sources/debugger/script-failed-to-parse.html

Issue 272613002: DevTools: implemented scriptFailedToParse protocol event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..88d56f01083fbe3a3b95349beabe72d8dd56b73c
--- /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>
+function addScript(url)
+{
+ var head = document.getElementsByTagName('head')[0];
+ var script = document.createElement('script');
+ script.setAttribute('src', url);
+ head.appendChild(script);
+}
+
+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()">
+<p>
+Tests that FailedToParseScriptSource event is raised after compile script with syntax error.
+</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698