blob: 58c48e17732f9a9105c9b9fbe8413331c14c1e68 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<script>
description('Test that the window.onerror handler in resources/js-test.js ' +
'stops asynchronous tests');
function buggyAsyncCode()
{
debug("Simulating an unexpected error");
// If the onerror handler doesn't finish async tests, this test will
// timeout, and the line below will not show.
throw new Error("An unexpected error");
}
window.jsTestIsAsync = true;
debug("Will throw an error soon");
</script>
<body onload="setTimeout(buggyAsyncCode, 0)"></body>