3 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../../http/tests/inspector/debugger-test.js"></script>
5 <script src=
"../../../http/tests/inspector/console-test.js"></script>
9 function testFunction()
12 // This used to be a racy crash. Test some sequence of functions.
13 functions
= [f2
, f1
, f2
, f1
, f2
, f1
, f2
, f1
];
14 functions
.push(function() {});
19 setTimeout(functions
.shift(), 0);
20 document
.body
.appendChild("<throw_exception>");
24 setTimeout(functions
.shift(), 0);
25 new Range().compareBoundaryPoints(1, 2);
30 var expectedErrorsCount
= 8;
32 InspectorTest
.setQuiet(true);
33 InspectorTest
.startDebuggerTest(step1
);
37 InspectorTest
.DebuggerAgent
.setPauseOnExceptions(WebInspector
.DebuggerModel
.PauseOnExceptionsState
.PauseOnUncaughtExceptions
);
38 InspectorTest
.runTestFunctionAndWaitUntilPaused(didPause
);
41 function didPause(callFrames
, reason
, breakpointIds
, asyncStackTrace
)
43 --expectedErrorsCount
;
44 if (!expectedErrorsCount
) {
45 InspectorTest
.waitUntilNthMessageReceived(1, step2
);
46 InspectorTest
.resumeExecution();
48 InspectorTest
.resumeExecution(InspectorTest
.waitUntilPaused
.bind(InspectorTest
, didPause
));
54 InspectorTest
.dumpConsoleMessages();
58 function completeTest()
60 InspectorTest
.DebuggerAgent
.setPauseOnExceptions(WebInspector
.DebuggerModel
.PauseOnExceptionsState
.DontPauseOnExceptions
);
61 InspectorTest
.completeDebuggerTest();
67 <body onload=
"window.testRunner ? runTest() : testFunction()">
69 Tests that pausing on uncaught exceptions thrown from C++ bindings will not crash.