| OLD | NEW |
| 1 Tests that all inlined scripts from the same document are shown in the same sour
ce frame with html script tags. Bug 54544. |
| 2 |
| 3 Debugger was enabled. |
| 4 window.location: #hash |
| 5 Script source was shown. |
| 6 Script execution paused. |
| 7 Call stack: |
| 8 0) f4 (debug-inlined-scripts-fragment-id.html:6) |
| 9 1) (debug-inlined-scripts-fragment-id.html:8) |
| 10 ==Source frame contents start== |
| 1 <html> | 11 <html> |
| 2 <head> | 12 <head> |
| 3 <script> function f1() { return 0; }; f1(); </script> <script>function f
2() { return 0; }</script><script> | |
| 4 function f3() { return 0; } | |
| 5 </script> | |
| 6 | |
| 7 <script> | 13 <script> |
| 8 function f4() | 14 function f4() |
| 9 { | 15 { |
| 10 return 0; | 16 return 0; |
| 11 } | 17 } |
| 12 f4(); | 18 f4(); |
| 13 </script> | 19 </script> |
| 14 | 20 |
| 15 <script src="../../http/tests/inspector/inspector-test.js"></script> | 21 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 16 <script src="../../http/tests/inspector/debugger-test.js"></script> | 22 <script src="../../http/tests/inspector/debugger-test.js"></script> |
| 17 | 23 |
| 18 <script> | 24 <script> |
| 19 | 25 |
| 20 var test = function() | 26 var test = function() |
| 21 { | 27 { |
| 22 InspectorTest.startDebuggerTest(step1, true); | 28 InspectorTest.startDebuggerTest(step0, true); |
| 23 | 29 |
| 24 function step1() | 30 function step0() |
| 25 { | 31 { |
| 26 InspectorTest.showScriptSource("debug-inlined-scripts.html", step2); | 32 InspectorTest.evaluateInPage("window.location=\"#hash\"", step1); |
| 33 } |
| 34 |
| 35 function step1(loc) |
| 36 { |
| 37 InspectorTest.addResult("window.location: " + loc.description); |
| 38 InspectorTest.showScriptSource("debug-inlined-scripts-fragment-id.html",
step2); |
| 27 } | 39 } |
| 28 | 40 |
| 29 function step2(sourceFrame) | 41 function step2(sourceFrame) |
| 30 { | 42 { |
| 31 InspectorTest.addResult("Script source was shown."); | 43 InspectorTest.addResult("Script source was shown."); |
| 32 InspectorTest.setBreakpoint(sourceFrame, 2, "", true); | 44 // Use fake resources to make sure that scripts will be loaded from Java
Script VM. |
| 33 InspectorTest.setBreakpoint(sourceFrame, 9, "", true); | 45 WebInspector.networkManager.inflightResourceForURL = function() { return
new WebInspector.Resource(); }; |
| 46 InspectorTest.setBreakpoint(sourceFrame, 5, "", true); |
| 34 InspectorTest.waitUntilPaused(step3); | 47 InspectorTest.waitUntilPaused(step3); |
| 35 InspectorTest.reloadPage(InspectorTest.completeDebuggerTest.bind(Inspect
orTest)); | 48 InspectorTest.reloadPage(InspectorTest.completeDebuggerTest.bind(Inspect
orTest)); |
| 36 } | 49 } |
| 37 | 50 |
| 38 function step3(callFrames) | 51 function step3(callFrames) |
| 39 { | 52 { |
| 40 InspectorTest.addResult("Script execution paused."); | 53 InspectorTest.addResult("Script execution paused."); |
| 41 InspectorTest.captureStackTrace(callFrames); | 54 InspectorTest.captureStackTrace(callFrames); |
| 42 InspectorTest.showScriptSource("debug-inlined-scripts.html", step4); | 55 InspectorTest.showScriptSource("debug-inlined-scripts-fragment-id.html",
step4); |
| 43 } | 56 } |
| 44 | 57 |
| 45 function step4(sourceFrame) | 58 function step4(sourceFrame) |
| 46 { | 59 { |
| 47 InspectorTest.dumpSourceFrameContents(sourceFrame); | 60 InspectorTest.dumpSourceFrameContents(sourceFrame); |
| 48 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, s
tep5)); | 61 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, s
tep5)); |
| 49 } | 62 } |
| 50 | 63 |
| 51 function step5(callFrames) | 64 function step5(callFrames) |
| 52 { | 65 { |
| 53 if (callFrames[0].location.lineNumber !== 9) { | 66 if (callFrames[0].location.lineNumber !== 9) { |
| 54 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(nul
l, step5)); | 67 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(nul
l, step5)); |
| 55 return; | 68 return; |
| 56 } | 69 } |
| 57 | |
| 58 InspectorTest.addResult("Script execution paused."); | 70 InspectorTest.addResult("Script execution paused."); |
| 59 InspectorTest.captureStackTrace(callFrames); | 71 InspectorTest.captureStackTrace(callFrames); |
| 60 InspectorTest.showScriptSource("debug-inlined-scripts.html", step6); | 72 InspectorTest.showScriptSource("debug-inlined-scripts-fragment-id.html",
step6); |
| 61 } | 73 } |
| 62 | 74 |
| 63 function step6(sourceFrame) | 75 function step6(sourceFrame) |
| 64 { | 76 { |
| 65 InspectorTest.dumpSourceFrameContents(sourceFrame); | 77 InspectorTest.dumpSourceFrameContents(sourceFrame); |
| 66 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, s
tep7)); | 78 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, s
tep7)); |
| 67 } | 79 } |
| 68 | 80 |
| 69 function step7() | 81 function step7() |
| 70 { | 82 { |
| 71 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, s
tep5)); | 83 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, s
tep5)); |
| 72 } | 84 } |
| 73 } | 85 } |
| 74 | 86 |
| 75 </script> | 87 </script> |
| 76 | 88 |
| 77 </head> | 89 </head> |
| 78 | 90 |
| 79 <body onload="runTest()"> | 91 <body onload="runTest()"> |
| 80 <p> | 92 <p> |
| 81 Tests that all inlined scripts from the same document are shown in the same sour
ce frame with html script tags. | 93 Tests that all inlined scripts from the same document are shown in the same sour
ce frame with html script tags. |
| 82 <a href="https://bugs.webkit.org/show_bug.cgi?id=54544">Bug 54544.</a> | 94 <a id="hash" href="https://bugs.webkit.org/show_bug.cgi?id=54544">Bug 54544.</a> |
| 83 </p> | 95 </p> |
| 84 | 96 |
| 85 </body> | 97 </body> |
| 86 </html> | 98 </html> |
| 99 |
| 100 ==Source frame contents end== |
| 101 Page reloaded. |
| 102 Debugger was disabled. |
| 103 |
| OLD | NEW |