Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / debugger / debugger-scripts.html
blobc9ae8ebfc536dbf91a25c5e43fbecbcce6c8fec4
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
6 <script>
7 function test()
9 var scripts = [];
10 InspectorTest.startDebuggerTest(step1);
12 function step1()
14 InspectorTest.queryScripts(function(script) { step2({ data: script }) });
15 InspectorTest.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.ParsedScriptSource, step2);
18 function step2(event)
20 var script = event.data;
21 if (script.sourceURL !== InspectorTest.resourceTreeModel.inspectedPageURL())
22 return;
23 scripts.push(script);
24 if (scripts.length === 6)
25 step3();
28 function step3()
30 scripts.sort(function(x, y) { return x.lineOffset - y.lineOffset });
31 for (var i = 0; i < scripts.length; ++i) {
32 InspectorTest.addResult("script " + (i + 1) + ":");
33 InspectorTest.addResult(" start: " + scripts[i].lineOffset + ":" + scripts[i].columnOffset);
34 InspectorTest.addResult(" end: " + scripts[i].endLine + ":" + scripts[i].endColumn);
36 InspectorTest.completeDebuggerTest();
39 </script> <script>
40 function f1()
43 </script>
44 <script> function f2() {} </script>
45 <script>function f3() {}
46 </script>
47 <script>
48 function f4() {}
49 </script>
51 </head>
52 <body onload="window.dummy = function() { }; runTest()">
53 <p>
54 Tests that valid parsed script notifications are received by front-end.
55 <a href="https://bugs.webkit.org/show_bug.cgi?id=52721">Bug 52721</a>
56 </p>
57 </body>
59 </html>