blob: 774fbde1056b2a1469418c31e53e4b25ab6c732d [file] [log] [blame]
<!doctype html>
<html>
<head>
<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
<script>
function test()
{
InspectorTest.suppressStackTraces = true;
let suite = InspectorTest.createAsyncSuite("UncaughtExceptionInsideTestCase");
suite.addTestCase({
name: "CatchRejectedPromise",
description: "window.reportUnhandledRejection should dump the unhandled exception and quit testing.",
test(resolve, reject) {
throw new Error("This promise is rejected with an Error object.");
}
})
suite.runTestCasesAndFinish();
}
</script>
</head>
<body onload="runTest()">
<p>Test that the unhandled promise rejection hook will immediately terminate the test and print the associated exception and stack trace.</p>
</body>
</html>