blob: 9b6a36523cba978ac0fa544eb0aa73e0731ac54e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<!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");
setTimeout(buggyAsyncCode, 0);
</script>
|