1 Tests that all inlined scripts from the same document are shown in the same source frame with html script tags. Bug 54544.
4 Script source was shown.
5 Script execution paused.
7 0) (debug-inlined-scripts.html:3)
8 Call stack status: Paused on a JavaScript breakpoint.
9 ==Source frame contents start==
12 <script> function f1() { return 0; }; f1(); </script> <script>function f2() { return 0; }</script><script>
13 function f3() { return 0; }
24 <script src="../../../http/tests/inspector/inspector-test.js"></script>
25 <script src="../../../http/tests/inspector/debugger-test.js"></script>
31 var panel = WebInspector.inspectorView.panel("sources");
32 InspectorTest.startDebuggerTest(step1, true);
34 function callstackStatus()
36 var statusElement = panel.sidebarPanes.callstack._statusMessageElement;
37 return statusElement ? statusElement.textContent : "";
42 InspectorTest.showScriptSource("debug-inlined-scripts.html", step2);
45 function step2(sourceFrame)
47 InspectorTest.addResult("Script source was shown.");
48 InspectorTest.setBreakpoint(sourceFrame, 2, "", true);
49 InspectorTest.setBreakpoint(sourceFrame, 9, "", true);
50 InspectorTest.waitUntilPaused(step3);
51 InspectorTest.reloadPage(InspectorTest.completeDebuggerTest.bind(InspectorTest));
54 function step3(callFrames)
56 InspectorTest.addResult("Script execution paused.");
57 InspectorTest.captureStackTrace(callFrames);
58 InspectorTest.addResult("Call stack status: " + callstackStatus());
59 InspectorTest.showScriptSource("debug-inlined-scripts.html", step4);
62 function step4(sourceFrame)
64 InspectorTest.dumpSourceFrameContents(sourceFrame);
65 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5));
68 function step5(callFrames)
70 if (callFrames[0].location.lineNumber !== 9) {
71 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5));
75 InspectorTest.addResult("Script execution paused.");
76 InspectorTest.captureStackTrace(callFrames);
77 InspectorTest.showScriptSource("debug-inlined-scripts.html", step6);
80 function step6(sourceFrame)
82 InspectorTest.dumpSourceFrameContents(sourceFrame);
83 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step7));
88 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5));
96 <body onload="runTest()">
98 Tests that all inlined scripts from the same document are shown in the same source frame with html script tags.
99 <a href="https://bugs.webkit.org/show_bug.cgi?id=54544">Bug 54544.</a>
105 ==Source frame contents end==
106 Script execution paused.
108 0) f4 (debug-inlined-scripts.html:10)
109 1) (debug-inlined-scripts.html:12)
110 ==Source frame contents start==
113 <script> function f1() { return 0; }; f1(); </script> <script>function f2() { return 0; }</script><script>
114 function f3() { return 0; }
125 <script src="../../../http/tests/inspector/inspector-test.js"></script>
126 <script src="../../../http/tests/inspector/debugger-test.js"></script>
130 var test = function()
132 var panel = WebInspector.inspectorView.panel("sources");
133 InspectorTest.startDebuggerTest(step1, true);
135 function callstackStatus()
137 var statusElement = panel.sidebarPanes.callstack._statusMessageElement;
138 return statusElement ? statusElement.textContent : "";
143 InspectorTest.showScriptSource("debug-inlined-scripts.html", step2);
146 function step2(sourceFrame)
148 InspectorTest.addResult("Script source was shown.");
149 InspectorTest.setBreakpoint(sourceFrame, 2, "", true);
150 InspectorTest.setBreakpoint(sourceFrame, 9, "", true);
151 InspectorTest.waitUntilPaused(step3);
152 InspectorTest.reloadPage(InspectorTest.completeDebuggerTest.bind(InspectorTest));
155 function step3(callFrames)
157 InspectorTest.addResult("Script execution paused.");
158 InspectorTest.captureStackTrace(callFrames);
159 InspectorTest.addResult("Call stack status: " + callstackStatus());
160 InspectorTest.showScriptSource("debug-inlined-scripts.html", step4);
163 function step4(sourceFrame)
165 InspectorTest.dumpSourceFrameContents(sourceFrame);
166 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5));
169 function step5(callFrames)
171 if (callFrames[0].location.lineNumber !== 9) {
172 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5));
176 InspectorTest.addResult("Script execution paused.");
177 InspectorTest.captureStackTrace(callFrames);
178 InspectorTest.showScriptSource("debug-inlined-scripts.html", step6);
181 function step6(sourceFrame)
183 InspectorTest.dumpSourceFrameContents(sourceFrame);
184 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step7));
189 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5));
197 <body onload="runTest()">
199 Tests that all inlined scripts from the same document are shown in the same source frame with html script tags.
200 <a href="https://bugs.webkit.org/show_bug.cgi?id=54544">Bug 54544.</a>
206 ==Source frame contents end==
208 Debugger was disabled.