 Chromium Code Reviews
 Chromium Code Reviews Issue 1663723002:
  [DevTools] Add sourceMap support for blackboxing  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@call-set-blackboxed-ranges-on-script-parsed
    
  
    Issue 1663723002:
  [DevTools] Add sourceMap support for blackboxing  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@call-set-blackboxed-ranges-on-script-parsed| 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-sourcemap.js"></script> | 
| 6 <script> | 6 <script> | 
| 7 | |
| 8 var counter = 0; | |
| 9 | |
| 10 function testFunction() | 7 function testFunction() | 
| 11 { | 8 { | 
| 12 Framework.scheduleUntilDone(callback, 0); | 9 debugger; | 
| 10 return foo(callback); | |
| 13 } | 11 } | 
| 14 | 12 | 
| 15 function callback() | 13 function callback(i) | 
| 16 { | 14 { | 
| 17 ++counter; | 15 return i; | 
| 18 if (counter === 1) | |
| 19 stop(); | |
| 20 return counter === 2; | |
| 21 } | |
| 22 | |
| 23 function stop() | |
| 24 { | |
| 25 debugger; | |
| 26 } | 16 } | 
| 27 | 17 | 
| 28 function test() | 18 function test() | 
| 29 { | 19 { | 
| 30 var frameworkRegexString = "/framework\\.js$"; | 20 var frameworkRegexString = "/framework\\.js$"; | 
| 31 WebInspector.settingForTest("skipStackFramesPattern").set(frameworkRegexStri ng); | 21 WebInspector.settingForTest("skipStackFramesPattern").set(frameworkRegexStri ng); | 
| 32 | 22 | 
| 33 InspectorTest.startDebuggerTest(step1, true); | 23 InspectorTest.startDebuggerTest(step1, true); | 
| 34 | 24 | 
| 35 function step1() | 25 function step1() | 
| 36 { | 26 { | 
| 37 InspectorTest.runTestFunctionAndWaitUntilPaused(step2); | 27 InspectorTest.runTestFunctionAndWaitUntilPaused(step2); | 
| 38 } | 28 } | 
| 39 | 29 | 
| 40 function step2() | 30 function step2() | 
| 41 { | 31 { | 
| 42 var actions = [ | 32 var actions = [ | 
| 43 "Print", // debugger; | 33 "Print", // "debugger" in testFunction() | 
| 44 "StepOut", "Print", | 34 "StepInto", "StepInto", "Print", // entered callback(i) | 
| 
dgozman
2016/02/03 18:24:10
Can we have more extensive test? Examine async cal
 
kozy
2016/02/09 23:10:09
This test is checked stepping behavior with blackb
 | |
| 45 "StepInto", "Print", | 35 "StepOut", "Print" | 
| 46 "StepInto", "Print", // Should NOT stop on setTimeout() inside frame work | |
| 47 ]; | 36 ]; | 
| 48 InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, step3); | 37 InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, step3); | 
| 49 } | 38 } | 
| 50 | 39 | 
| 51 function step3() | 40 function step3() | 
| 52 { | 41 { | 
| 53 InspectorTest.completeDebuggerTest(); | 42 InspectorTest.completeDebuggerTest(); | 
| 54 } | 43 } | 
| 55 } | 44 } | 
| 56 | |
| 57 </script> | 45 </script> | 
| 58 </head> | 46 </head> | 
| 59 | |
| 60 <body onload="runTest()"> | 47 <body onload="runTest()"> | 
| 61 <input type='button' onclick='testFunction()' value='Test'/> | 48 <p>Tests framework blackboxing feature with sourcemaps.</p> | 
| 62 <p> | |
| 63 Tests that stepping into blackboxed framework will not pause on setTimeout() ins ide the framework. | |
| 64 </p> | |
| 65 </body> | 49 </body> | 
| 66 </html> | 50 </html> | 
| OLD | NEW |