| 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 window.callbackFromFramework = function(next) | |
| 9 { | |
| 10 return next(); | |
| 11 } | |
| 12 | |
| 13 function testFunction() | 8 function testFunction() |
| 14 { | 9 { |
| 15 setTimeout(timeout1, 0); | 10 Framework.throwFrameworkExceptionAndCatch(); |
| 16 } | 11 Framework.throwInNativeAndCatch(); |
| 17 | 12 |
| 18 function timeout1() | 13 // All above should be skipped. |
| 19 { | |
| 20 Framework.safeRun(Framework.empty, callback1); | |
| 21 } | |
| 22 | |
| 23 function callback1() | |
| 24 { | |
| 25 Framework.doSomeAsyncChainCalls(callback2); | |
| 26 } | |
| 27 | |
| 28 function callback2() | |
| 29 { | |
| 30 debugger; | 14 debugger; |
| 31 } | 15 } |
| 32 | 16 |
| 33 function test() | 17 function test() |
| 34 { | 18 { |
| 35 var frameworkRegexString = "/framework\\.js$"; | 19 var frameworkRegexString = "/framework\\.js$"; |
| 36 var maxAsyncCallStackDepth = 4; | |
| 37 | |
| 38 WebInspector.experimentsSettings.frameworksDebuggingSupport.enableForTest(); | 20 WebInspector.experimentsSettings.frameworksDebuggingSupport.enableForTest(); |
| 39 WebInspector.settings.skipStackFramesPattern.set(frameworkRegexString); | 21 WebInspector.settings.skipStackFramesPattern.set(frameworkRegexString); |
| 40 | 22 |
| 41 InspectorTest.setQuiet(true); | 23 InspectorTest.setQuiet(true); |
| 42 InspectorTest.startDebuggerTest(step1); | 24 InspectorTest.startDebuggerTest(step1); |
| 43 | 25 |
| 44 function step1() | 26 function step1() |
| 45 { | 27 { |
| 46 DebuggerAgent.setAsyncCallStackDepth(maxAsyncCallStackDepth, step2); | 28 DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerModel.PauseOnExc
eptionsState.PauseOnAllExceptions); |
| 47 } | |
| 48 | |
| 49 function step2() | |
| 50 { | |
| 51 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause); | 29 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause); |
| 52 } | 30 } |
| 53 | 31 |
| 54 function didPause(callFrames, reason, breakpointIds, asyncStackTrace) | 32 function didPause(callFrames, reason, breakpointIds, asyncStackTrace) |
| 55 { | 33 { |
| 56 InspectorTest.captureStackTrace(callFrames, asyncStackTrace, { "dropFram
eworkCallFrames": false }); | 34 InspectorTest.captureStackTrace(callFrames); |
| 57 InspectorTest.addResult("\nPrinting visible call stack:"); | 35 completeTest(); |
| 58 InspectorTest.captureStackTrace(callFrames, asyncStackTrace, { "dropFram
eworkCallFrames": true }); | 36 } |
| 37 |
| 38 function completeTest() |
| 39 { |
| 40 DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerModel.PauseOnExc
eptionsState.DontPauseOnExceptions); |
| 59 InspectorTest.completeDebuggerTest(); | 41 InspectorTest.completeDebuggerTest(); |
| 60 } | 42 } |
| 61 } | 43 } |
| 62 | 44 |
| 63 </script> | 45 </script> |
| 64 </head> | 46 </head> |
| 65 | 47 |
| 66 <body onload="runTest()"> | 48 <body onload="runTest()"> |
| 67 <input type='button' onclick='testFunction()' value='Test'/> | 49 <input type='button' onclick='testFunction()' value='Test'/> |
| 68 <p> | 50 <p> |
| 69 Tests the async call stacks and framework black-boxing features working together
. | 51 Tests that framework black-boxing skips exceptions, including those that happene
d deeper inside V8 native script. |
| 70 </p> | 52 </p> |
| 71 </body> | 53 </body> |
| 72 </html> | 54 </html> |
| OLD | NEW |