1 Tests that all inlined scripts from the same document are shown in the same source frame with html script tags. Bug 54544.
3 Script source was shown.
4 Script execution paused.
6 0) (debug-inlined-scripts.html:3)
7 Call stack status: Paused on a JavaScript breakpoint.
8 ==Source frame contents start==
11 <script> function f1() { return 0; }; f1(); </script> <script>function f2() { return 0; }</script><script>
12 function f3() { return 0; }
23 <script src="../../../http/tests/inspector/inspector-test.js"></script>
24 <script src="../../../http/tests/inspector/debugger-test.js"></script>
30 var panel = WebInspector.panels.sources;
31 InspectorTest.startDebuggerTest(step1, true);
33 function callstackStatus()
35 var statusElement = panel.sidebarPanes.callstack._statusMessageElement;
36 return statusElement ? statusElement.textContent : "";
41 InspectorTest.showScriptSource("debug-inlined-scripts.html", step2);
44 function step2(sourceFrame)
46 InspectorTest.addResult("Script source was shown.");
47 InspectorTest.setBreakpoint(sourceFrame, 2, "", true);
48 InspectorTest.setBreakpoint(sourceFrame, 9, "", true);
49 InspectorTest.waitUntilPaused(step3);
50 InspectorTest.reloadPage(InspectorTest.completeDebuggerTest.bind(InspectorTest));
53 function step3(callFrames)
55 InspectorTest.addResult("Script execution paused.");
56 InspectorTest.captureStackTrace(callFrames);
57 InspectorTest.addResult("Call stack status: " + callstackStatus());
58 InspectorTest.showScriptSource("debug-inlined-scripts.html", step4);
61 function step4(sourceFrame)
63 InspectorTest.dumpSourceFrameContents(sourceFrame);
64 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5));
67 function step5(callFrames)
69 if (callFrames[0].location().lineNumber !== 9) {
70 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5));
74 InspectorTest.addResult("Script execution paused.");
75 InspectorTest.captureStackTrace(callFrames);
76 InspectorTest.showScriptSource("debug-inlined-scripts.html", step6);
79 function step6(sourceFrame)
81 InspectorTest.dumpSourceFrameContents(sourceFrame);
82 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step7));
87 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5));
95 <body onload="runTest()">
97 Tests that all inlined scripts from the same document are shown in the same source frame with html script tags.
98 <a href="https://bugs.webkit.org/show_bug.cgi?id=54544">Bug 54544.</a>
104 ==Source frame contents end==
105 Script execution paused.
107 0) f4 (debug-inlined-scripts.html:10)
108 1) (debug-inlined-scripts.html:12)
109 ==Source frame contents start==
112 <script> function f1() { return 0; }; f1(); </script> <script>function f2() { return 0; }</script><script>
113 function f3() { return 0; }
124 <script src="../../../http/tests/inspector/inspector-test.js"></script>
125 <script src="../../../http/tests/inspector/debugger-test.js"></script>
129 var test = function()
131 var panel = WebInspector.panels.sources;
132 InspectorTest.startDebuggerTest(step1, true);
134 function callstackStatus()
136 var statusElement = panel.sidebarPanes.callstack._statusMessageElement;
137 return statusElement ? statusElement.textContent : "";
142 InspectorTest.showScriptSource("debug-inlined-scripts.html", step2);
145 function step2(sourceFrame)
147 InspectorTest.addResult("Script source was shown.");
148 InspectorTest.setBreakpoint(sourceFrame, 2, "", true);
149 InspectorTest.setBreakpoint(sourceFrame, 9, "", true);
150 InspectorTest.waitUntilPaused(step3);
151 InspectorTest.reloadPage(InspectorTest.completeDebuggerTest.bind(InspectorTest));
154 function step3(callFrames)
156 InspectorTest.addResult("Script execution paused.");
157 InspectorTest.captureStackTrace(callFrames);
158 InspectorTest.addResult("Call stack status: " + callstackStatus());
159 InspectorTest.showScriptSource("debug-inlined-scripts.html", step4);
162 function step4(sourceFrame)
164 InspectorTest.dumpSourceFrameContents(sourceFrame);
165 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5));
168 function step5(callFrames)
170 if (callFrames[0].location().lineNumber !== 9) {
171 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5));
175 InspectorTest.addResult("Script execution paused.");
176 InspectorTest.captureStackTrace(callFrames);
177 InspectorTest.showScriptSource("debug-inlined-scripts.html", step6);
180 function step6(sourceFrame)
182 InspectorTest.dumpSourceFrameContents(sourceFrame);
183 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step7));
188 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5));
196 <body onload="runTest()">
198 Tests that all inlined scripts from the same document are shown in the same source frame with html script tags.
199 <a href="https://bugs.webkit.org/show_bug.cgi?id=54544">Bug 54544.</a>
205 ==Source frame contents end==