blob: bbe9af390bc8db4df49e6336d2d28948093fc34c [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<script>
description('Test unhandled promise rejection event produces console messages. The test passes when you see 3 console messages for unhandled promise rejections.');
window.jsTestIsAsync = true;
window.promise = [];
for (let i = 0; i < 3; ++i)
window.promise[i] = Promise.reject(i);
window.onunhandledrejection = function (e) { return true; };
setTimeout(function () { finishJSTest(); }, 100);
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>