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