blob: 61366908b00783a9947528b4f5c084aaeb3662ca [file] [log] [blame]
<!doctype html>
<html>
<head>
<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
<script>
TestPage.allowUncaughtExceptions = true;
TestPage.needToSanitizeUncaughtExceptionURLs = true;
function triggerStackOverflowException() {
function f() { f(); }
f();
}
window.addEventListener("error", (event) => {
TestPage.dispatchEventToFrontend("AfterError");
});
function test()
{
WI.debuggerManager.allExceptionsBreakpoint.disabled = false;
let suite = InspectorTest.createAsyncSuite("Debugger.StackOverflowException");
suite.addTestCase({
name: "Debugger.StackOverflowException.NoPause",
description: "Should not pause on a StackOverflow Exception.",
test(resolve, reject) {
let paused = false;
WI.debuggerManager.singleFireEventListener(WI.DebuggerManager.Event.Paused, (event) => {
paused = true;
InspectorTest.fail("Should not pause.");
reject();
});
InspectorTest.singleFireEventListener("AfterError", (event) => {
if (!paused)
InspectorTest.pass("Should not pause on StackOverflow Exception.");
resolve();
});
InspectorTest.evaluateInPage(`setTimeout(triggerStackOverflowException)`);
}
});
suite.runTestCasesAndFinish();
}
</script>
</head>
<body onload="runTest()">
<p>Test we do not pause on a StackOverflow Exception.</p>
</body>
</html>