| 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 debugger; | |
| 11 Promise.resolve() | |
| 12 // Should not pause on console.assert() inside framework. | |
| 13 .then(Framework.bind(Framework.assert, null, false, "Assert from test")) | |
| 14 // Should not pause on setTimeout inside the framework. | |
| 15 .then(Framework.willSchedule(Framework.empty, 0)) | |
| 16 .then(stop) | |
| 17 .catch(function FAIL_should_not_pause(e) { debugger; throw e; }); | |
| 18 } | |
| 19 | |
| 20 function stop() | |
| 21 { | |
| 22 setTimeout(function() {}, 0); // Should pause here. | |
| 23 } | |
| 24 | |
| 25 function test() | |
| 26 { | |
| 27 var frameworkRegexString = "/framework\\.js$"; | |
| 28 WebInspector.settingForTest("skipStackFramesPattern").set(frameworkRegexStri
ng); | |
| 29 | |
| 30 var pane = WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints
; | |
| 31 | |
| 32 InspectorTest.startDebuggerTest(step1, true); | |
| 33 | |
| 34 function step1() | |
| 35 { | |
| 36 InspectorTest.runTestFunctionAndWaitUntilPaused(step2); | |
| 37 } | |
| 38 | |
| 39 function step2() | |
| 40 { | |
| 41 InspectorTest.DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerMo
del.PauseOnExceptionsState.PauseOnAllExceptions); | |
| 42 pane._setBreakpoint("instrumentation:setTimer"); | |
| 43 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(Inspect
orTest, didPause)); | |
| 44 } | |
| 45 | |
| 46 function didPause(callFrames, reason, breakpointIds, asyncStackTrace) | |
| 47 { | |
| 48 InspectorTest.captureStackTrace(callFrames); | |
| 49 completeTest(); | |
| 50 } | |
| 51 | |
| 52 function completeTest() | |
| 53 { | |
| 54 InspectorTest.DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerMo
del.PauseOnExceptionsState.DontPauseOnExceptions); | |
| 55 pane._removeBreakpoint("instrumentation:setTimer"); | |
| 56 InspectorTest.completeDebuggerTest(); | |
| 57 } | |
| 58 } | |
| 59 | |
| 60 </script> | |
| 61 </head> | |
| 62 | |
| 63 <body onload="runTest()"> | |
| 64 <input type='button' onclick='testFunction()' value='Test'/> | |
| 65 <p> | |
| 66 Tests that framework blackboxing skips instant pauses (e.g. breakpoints on conso
le.assert(), setTimeout(), etc.) if they happen entirely inside the framework. | |
| 67 </p> | |
| 68 </body> | |
| 69 </html> | |
| OLD | NEW |