| 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="resources/framework.js"></script> | 5 <script src="resources/framework.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 var counter = 0; |
| 9 |
| 8 function testFunction() | 10 function testFunction() |
| 9 { | 11 { |
| 10 Framework.safeRun(Framework.breakInFramework, Framework.empty) | 12 Framework.scheduleUntilDone(callback, 0); |
| 11 Framework.safeRun(Framework.empty); // should not step inside | 13 } |
| 12 Framework.empty(); // dummy call | 14 |
| 13 Framework.sendXHR('/foo?a=b'); | 15 function callback() |
| 16 { |
| 17 ++counter; |
| 18 if (counter === 1) |
| 19 stop(); |
| 20 return counter === 2; |
| 21 } |
| 22 |
| 23 function stop() |
| 24 { |
| 25 debugger; |
| 14 } | 26 } |
| 15 | 27 |
| 16 function test() | 28 function test() |
| 17 { | 29 { |
| 18 var frameworkRegexString = "/framework\\.js$"; | 30 var frameworkRegexString = "/framework\\.js$"; |
| 19 WebInspector.settings.skipStackFramesPattern.set(frameworkRegexString); | 31 WebInspector.settings.skipStackFramesPattern.set(frameworkRegexString); |
| 20 | 32 |
| 21 InspectorTest.setQuiet(true); | 33 InspectorTest.startDebuggerTest(step1, true); |
| 22 InspectorTest.startDebuggerTest(step1); | |
| 23 | |
| 24 var xhrPane; | |
| 25 | 34 |
| 26 function step1() | 35 function step1() |
| 27 { | 36 { |
| 28 xhrPane = WebInspector.panels.sources.sidebarPanes.xhrBreakpoints; | |
| 29 xhrPane._setBreakpoint("foo", true); | |
| 30 InspectorTest.runTestFunctionAndWaitUntilPaused(step2); | 37 InspectorTest.runTestFunctionAndWaitUntilPaused(step2); |
| 31 } | 38 } |
| 32 | 39 |
| 33 function step2() | 40 function step2() |
| 34 { | 41 { |
| 35 var actions = [ | 42 var actions = [ |
| 36 "Print", // debugger; | 43 "Print", // debugger; |
| 44 "StepOut", "Print", |
| 37 "StepInto", "Print", | 45 "StepInto", "Print", |
| 38 "StepOver", "Print", | 46 "StepInto", "Print", // Should NOT stop on setTimeout() inside frame
work |
| 39 "StepOut", "Print", | |
| 40 "StepInto", "Print", // should not step inside | |
| 41 "Resume", "Print", // should stop on XHR.send() | |
| 42 "StepInto", "Print", // should step inside framework | |
| 43 ]; | 47 ]; |
| 44 InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, step3); | 48 InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, step3); |
| 45 } | 49 } |
| 46 | 50 |
| 47 function step3() | 51 function step3() |
| 48 { | 52 { |
| 49 xhrPane._removeBreakpoint("foo"); | |
| 50 InspectorTest.completeDebuggerTest(); | 53 InspectorTest.completeDebuggerTest(); |
| 51 } | 54 } |
| 52 } | 55 } |
| 53 | 56 |
| 54 </script> | 57 </script> |
| 55 </head> | 58 </head> |
| 56 | 59 |
| 57 <body onload="runTest()"> | 60 <body onload="runTest()"> |
| 58 <input type='button' onclick='testFunction()' value='Test'/> | 61 <input type='button' onclick='testFunction()' value='Test'/> |
| 59 <p> | 62 <p> |
| 60 Tests stepping from framework call frames. | 63 Tests that stepping into blackboxed framework will not pause on setTimeout() ins
ide the framework. |
| 61 </p> | 64 </p> |
| 62 </body> | 65 </body> |
| 63 </html> | 66 </html> |
| OLD | NEW |