| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | |
| 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> | |
| 5 <script src="resources/framework.js"></script> | |
| 6 <script> | |
| 7 | |
| 8 function testFunction() | |
| 9 { | |
| 10 for (var i = 1, func; func = eval("typeof test" + i + " === 'function' && te
st" + i); ++i) | |
| 11 func(); | |
| 12 } | |
| 13 | |
| 14 function callback() | |
| 15 { | |
| 16 return 0; | |
| 17 } | |
| 18 | |
| 19 function test1() | |
| 20 { | |
| 21 debugger; | |
| 22 Framework.empty(); | |
| 23 } | |
| 24 | |
| 25 function test2() | |
| 26 { | |
| 27 debugger; | |
| 28 Framework.doSomeWork(); | |
| 29 } | |
| 30 | |
| 31 function test3() | |
| 32 { | |
| 33 debugger; | |
| 34 Framework.safeRun(Framework.empty, callback); // Should step into callback | |
| 35 } | |
| 36 | |
| 37 function test4() | |
| 38 { | |
| 39 debugger; | |
| 40 Framework.safeRun(Framework.doSomeWork, callback); // Should NOT step into c
allback (otherwise too many StepIns) | |
| 41 } | |
| 42 | |
| 43 function test5() | |
| 44 { | |
| 45 debugger; | |
| 46 Framework.safeRun(Framework.empty, Framework.throwFrameworkException, callba
ck); // Should be enough to step into callback | |
| 47 } | |
| 48 | |
| 49 function test6() | |
| 50 { | |
| 51 debugger; | |
| 52 Framework.safeRun(Framework.doSomeWorkDoNotChangeTopCallFrame, callback); | |
| 53 } | |
| 54 | |
| 55 function test() | |
| 56 { | |
| 57 var frameworkRegexString = "/framework\\.js$"; | |
| 58 var totalDebuggerStatements = 6; | |
| 59 | |
| 60 WebInspector.settingForTest("skipStackFramesPattern").set(frameworkRegexStri
ng); | |
| 61 | |
| 62 InspectorTest.setQuiet(true); | |
| 63 InspectorTest.startDebuggerTest(step1); | |
| 64 | |
| 65 function step1() | |
| 66 { | |
| 67 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause); | |
| 68 } | |
| 69 | |
| 70 var step = 0; | |
| 71 var stepInCount = 0; | |
| 72 function didPause(callFrames, reason, breakpointIds, asyncStackTrace) | |
| 73 { | |
| 74 if (stepInCount < 2) { | |
| 75 ++stepInCount; | |
| 76 WebInspector.panels.sources._stepIntoButton.element.click(); | |
| 77 InspectorTest.waitUntilResumed(InspectorTest.waitUntilPaused.bind(In
spectorTest, didPause)); | |
| 78 return; | |
| 79 } | |
| 80 | |
| 81 stepInCount = 0; | |
| 82 InspectorTest.captureStackTrace(callFrames); | |
| 83 InspectorTest.addResult(""); | |
| 84 if (++step < totalDebuggerStatements) | |
| 85 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(Ins
pectorTest, didPause)); | |
| 86 else | |
| 87 InspectorTest.completeDebuggerTest(); | |
| 88 } | |
| 89 } | |
| 90 | |
| 91 </script> | |
| 92 </head> | |
| 93 | |
| 94 <body onload="runTest()"> | |
| 95 <input type='button' onclick='testFunction()' value='Test'/> | |
| 96 <p> | |
| 97 Tests the skip stack frames feature when stepping. | |
| 98 </p> | |
| 99 </body> | |
| 100 </html> | |
| OLD | NEW |