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

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, 6 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..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>

Powered by Google App Engine
This is Rietveld 408576698