Chromium Code Reviews| Index: LayoutTests/inspector/debugger/debug-inlined-scripts-fragment-id.html |
| diff --git a/LayoutTests/inspector/debugger/debug-inlined-scripts.html b/LayoutTests/inspector/debugger/debug-inlined-scripts-fragment-id.html |
| similarity index 66% |
| copy from LayoutTests/inspector/debugger/debug-inlined-scripts.html |
| copy to LayoutTests/inspector/debugger/debug-inlined-scripts-fragment-id.html |
| index c581f7a56dd4ea2ee5b9064404eb4e7cf5d53e34..7fcc2807a1d2cfff6da9d8e2e687a2710774fa76 100644 |
| --- a/LayoutTests/inspector/debugger/debug-inlined-scripts.html |
| +++ b/LayoutTests/inspector/debugger/debug-inlined-scripts-fragment-id.html |
| @@ -1,9 +1,5 @@ |
| <html> |
| <head> |
| - <script> function f1() { return 0; }; f1(); </script> <script>function f2() { return 0; }</script><script> |
| -function f3() { return 0; } |
| -</script> |
| - |
| <script> |
| function f4() |
| { |
| @@ -19,18 +15,25 @@ f4(); |
| var test = function() |
| { |
| - InspectorTest.startDebuggerTest(step1, true); |
| + InspectorTest.startDebuggerTest(step0, true); |
| + |
| + function step0() |
| + { |
| + InspectorTest.evaluateInPage("window.location=\"#hash\"", step1); |
| + } |
| - function step1() |
| + function step1(loc) |
| { |
| - InspectorTest.showScriptSource("debug-inlined-scripts.html", step2); |
| + InspectorTest.addResult("window.location: " + loc.description); |
| + InspectorTest.showScriptSource("debug-inlined-scripts-fragment-id.html", step2); |
| } |
| function step2(sourceFrame) |
| { |
| InspectorTest.addResult("Script source was shown."); |
| - InspectorTest.setBreakpoint(sourceFrame, 2, "", true); |
| - InspectorTest.setBreakpoint(sourceFrame, 9, "", true); |
| + // Use fake resources to make sure that scripts will be loaded from JavaScript VM. |
|
vsevik
2013/11/05 13:51:29
I don't think you need this.
|
| + WebInspector.networkManager.inflightResourceForURL = function() { return new WebInspector.Resource(); }; |
| + InspectorTest.setBreakpoint(sourceFrame, 5, "", true); |
| InspectorTest.waitUntilPaused(step3); |
| InspectorTest.reloadPage(InspectorTest.completeDebuggerTest.bind(InspectorTest)); |
| } |
| @@ -39,7 +42,7 @@ var test = function() |
| { |
| InspectorTest.addResult("Script execution paused."); |
| InspectorTest.captureStackTrace(callFrames); |
| - InspectorTest.showScriptSource("debug-inlined-scripts.html", step4); |
| + InspectorTest.showScriptSource("debug-inlined-scripts-fragment-id.html", step4); |
| } |
| function step4(sourceFrame) |
| @@ -54,10 +57,9 @@ var test = function() |
| InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5)); |
| return; |
| } |
| - |
| InspectorTest.addResult("Script execution paused."); |
| InspectorTest.captureStackTrace(callFrames); |
| - InspectorTest.showScriptSource("debug-inlined-scripts.html", step6); |
| + InspectorTest.showScriptSource("debug-inlined-scripts-fragment-id.html", step6); |
| } |
| function step6(sourceFrame) |
| @@ -79,7 +81,7 @@ var test = function() |
| <body onload="runTest()"> |
| <p> |
| Tests that all inlined scripts from the same document are shown in the same source frame with html script tags. |
| -<a href="https://bugs.webkit.org/show_bug.cgi?id=54544">Bug 54544.</a> |
| +<a id="hash" href="https://bugs.webkit.org/show_bug.cgi?id=54544">Bug 54544.</a> |
| </p> |
| </body> |