Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / debugger / debug-inlined-scripts.html
blob10dc3cc2e69498265aa3cb84e68a841a6e0a8f1c
1 <html>
2 <head>
3 <script> function f1() { return 0; }; f1(); </script> <script>function f2() { return 0; }</script><script>
4 function f3() { return 0; }
5 </script>
7 <script>
8 function f4()
10 return 0;
12 f4();
13 </script>
15 <script src="../../../http/tests/inspector/inspector-test.js"></script>
16 <script src="../../../http/tests/inspector/debugger-test.js"></script>
18 <script>
20 var test = function()
22 var panel = WebInspector.panels.sources;
23 InspectorTest.startDebuggerTest(step1, true);
25 function callstackStatus()
27 var statusElement = panel.sidebarPanes.callstack._statusMessageElement;
28 return statusElement ? statusElement.textContent : "";
31 function step1()
33 InspectorTest.showScriptSource("debug-inlined-scripts.html", step2);
36 function step2(sourceFrame)
38 InspectorTest.addResult("Script source was shown.");
39 InspectorTest.setBreakpoint(sourceFrame, 2, "", true);
40 InspectorTest.setBreakpoint(sourceFrame, 9, "", true);
41 InspectorTest.waitUntilPaused(step3);
42 InspectorTest.reloadPage(InspectorTest.completeDebuggerTest.bind(InspectorTest));
45 function step3(callFrames)
47 InspectorTest.addResult("Script execution paused.");
48 InspectorTest.captureStackTrace(callFrames);
49 InspectorTest.addResult("Call stack status: " + callstackStatus());
50 InspectorTest.showScriptSource("debug-inlined-scripts.html", step4);
53 function step4(sourceFrame)
55 InspectorTest.dumpSourceFrameContents(sourceFrame);
56 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5));
59 function step5(callFrames)
61 if (callFrames[0].location().lineNumber !== 9) {
62 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5));
63 return;
66 InspectorTest.addResult("Script execution paused.");
67 InspectorTest.captureStackTrace(callFrames);
68 InspectorTest.showScriptSource("debug-inlined-scripts.html", step6);
71 function step6(sourceFrame)
73 InspectorTest.dumpSourceFrameContents(sourceFrame);
74 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step7));
77 function step7()
79 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5));
83 </script>
85 </head>
87 <body onload="runTest()">
88 <p>
89 Tests that all inlined scripts from the same document are shown in the same source frame with html script tags.
90 <a href="https://bugs.webkit.org/show_bug.cgi?id=54544">Bug 54544.</a>
91 </p>
93 </body>
94 </html>