Chromium Code Reviews| 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/framework.js"></script> | 5 <script src="../debugger/resources/framework-with-source-map-compiled.js"></scri pt> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 var counter = 0; | |
| 9 | |
| 10 function testFunction() | 8 function testFunction() |
| 11 { | 9 { |
| 12 Framework.scheduleUntilDone(callback, 0); | |
| 13 } | |
| 14 | |
| 15 function callback() | |
| 16 { | |
| 17 ++counter; | |
| 18 if (counter === 1) | |
| 19 stop(); | |
| 20 return counter === 2; | |
| 21 } | |
| 22 | |
| 23 function stop() | |
| 24 { | |
| 25 debugger; | 10 debugger; |
| 11 foo(); | |
|
dgozman
2016/01/13 01:28:49
Let's make it foo(bar), where bar is defined in th
kozy
2016/01/13 20:47:57
Done.
| |
| 26 } | 12 } |
| 27 | 13 |
| 28 function test() | 14 function test() |
| 29 { | 15 { |
| 30 var frameworkRegexString = "/framework\\.js$"; | 16 var frameworkRegexString = "framework-with-source-map\\.js$"; |
| 31 WebInspector.settingForTest("skipStackFramesPattern").set(frameworkRegexStri ng); | 17 WebInspector.settingForTest("skipStackFramesPattern").set(frameworkRegexStri ng); |
| 32 | 18 |
| 33 InspectorTest.startDebuggerTest(step1, true); | 19 InspectorTest.startDebuggerTest(step1, true); |
| 34 | 20 |
| 35 function step1() | 21 function step1() |
| 36 { | 22 { |
| 37 InspectorTest.runTestFunctionAndWaitUntilPaused(step2); | 23 InspectorTest.runTestFunctionAndWaitUntilPaused(step2); |
| 38 } | 24 } |
| 39 | 25 |
| 40 function step2() | 26 function step2() |
| 41 { | 27 { |
| 42 var actions = [ | 28 var actions = [ |
| 43 "Print", // debugger; | 29 "Print", |
| 44 "StepOut", "Print", | |
| 45 "StepInto", "Print", | 30 "StepInto", "Print", |
| 46 "StepInto", "Print", // Should NOT stop on setTimeout() inside frame work | 31 "StepInto", "Print" |
| 47 ]; | 32 ]; |
| 48 InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, step3); | 33 InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, step3); |
| 49 } | 34 } |
| 50 | 35 |
| 51 function step3() | 36 function step3() |
| 52 { | 37 { |
| 53 InspectorTest.completeDebuggerTest(); | 38 InspectorTest.completeDebuggerTest(); |
| 54 } | 39 } |
| 55 } | 40 } |
| 56 | 41 |
| 57 </script> | 42 </script> |
| 58 </head> | 43 </head> |
| 59 | 44 |
| 60 <body onload="runTest()"> | 45 <body onload="runTest()"> |
| 61 <input type='button' onclick='testFunction()' value='Test'/> | |
| 62 <p> | 46 <p> |
| 63 Tests that stepping into blackboxed framework will not pause on setTimeout() ins ide the framework. | 47 Tests that stepping into blackboxed framework will not pause if source map is us ed. |
| 64 </p> | 48 </p> |
| 65 </body> | 49 </body> |
| 66 </html> | 50 </html> |
| OLD | NEW |