| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 5 <script src="../debugger/resources/unformatted-async.js"></script> |
| 5 <script> | 6 <script> |
| 6 | 7 |
| 7 function testFunction() | 8 function testFunction() |
| 8 { | 9 { |
| 9 setTimeout(functionFoo, 0); | 10 setTimeout(f2, 0); |
| 10 } | |
| 11 | |
| 12 function functionFoo() | |
| 13 { | |
| 14 debugger; | |
| 15 } | 11 } |
| 16 | 12 |
| 17 var test = function() | 13 var test = function() |
| 18 { | 14 { |
| 15 var scriptFormatter; |
| 19 InspectorTest.DebuggerAgent.setAsyncCallStackDepth(200, step1); | 16 InspectorTest.DebuggerAgent.setAsyncCallStackDepth(200, step1); |
| 20 | 17 |
| 21 function step1() | 18 function step1() |
| 22 { | 19 { |
| 23 InspectorTest.startDebuggerTest(step2); | 20 InspectorTest.scriptFormatter().then(step2); |
| 24 } | 21 } |
| 25 | 22 |
| 26 function step2() | 23 function step2(sf) |
| 27 { | 24 { |
| 28 InspectorTest.runTestFunctionAndWaitUntilPaused(step3); | 25 scriptFormatter = sf; |
| 26 InspectorTest.startDebuggerTest(step3); |
| 29 } | 27 } |
| 30 | 28 |
| 31 function step3() | 29 function step3() |
| 32 { | 30 { |
| 31 InspectorTest.showScriptSource("unformatted-async.js", step4); |
| 32 } |
| 33 |
| 34 function step4() |
| 35 { |
| 36 InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorAction.protot
ype, "_updateButton", step5); |
| 37 scriptFormatter._toggleFormatScriptSource(); |
| 38 } |
| 39 |
| 40 function step5() |
| 41 { |
| 42 InspectorTest.runTestFunctionAndWaitUntilPaused(step6); |
| 43 } |
| 44 |
| 45 function step6() |
| 46 { |
| 33 var callFrameList = self.runtime.sharedInstance(WebInspector.CallStackSi
debarPane).callFrameList; | 47 var callFrameList = self.runtime.sharedInstance(WebInspector.CallStackSi
debarPane).callFrameList; |
| 34 for (var item of callFrameList._items) | 48 for (var item of callFrameList._items) |
| 35 InspectorTest.addResult(item.element.textContent.replace(/VM\d+/g, "
VM")); | 49 InspectorTest.addResult(item.element.textContent.replace(/VM\d+/g, "
VM")); |
| 36 InspectorTest.completeDebuggerTest(); | 50 InspectorTest.completeDebuggerTest(); |
| 37 } | 51 } |
| 38 } | 52 } |
| 39 | 53 |
| 40 </script> | 54 </script> |
| 41 </head> | 55 </head> |
| 42 <body onload="runTest()"> | 56 <body onload="runTest()"> |
| 43 <p>Tests that call stack sidebar contains correct urls for call frames.</p> | 57 <p>Tests that call stack sidebar contains correct urls for call frames.</p> |
| 44 </body> | 58 </body> |
| 45 </html> | 59 </html> |
| OLD | NEW |