blob: 350a8814dea999e7205116c72fea86c163d6b74d [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 handler returning false does not produce console messages.');
window.jsTestIsAsync = true;
window.promise = [];
for (let i = 0; i < 3; ++i)
window.promise[i] = Promise.reject(i);
window.count = 0;
window.onunhandledrejection = function (e) {
count++;
return false;
};
setTimeout(function () {
shouldBe(`count`, `3`);
finishJSTest();
}, 100);
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>