Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / harness / error-in-async-test.html
blob9b6a36523cba978ac0fa544eb0aa73e0731ac54e
1 <!DOCTYPE html>
3 <script src="../../resources/js-test.js"></script>
4 <script>
5 description('Test that the window.onerror handler in resources/js-test.js ' +
6 'stops asynchronous tests');
8 function buggyAsyncCode()
10 debug("Simulating an unexpected error");
12 // If the onerror handler doesn't finish async tests, this test will
13 // timeout, and the line below will not show.
14 throw new Error("An unexpected error");
17 window.jsTestIsAsync = true;
18 debug("Will throw an error soon");
19 setTimeout(buggyAsyncCode, 0);
20 </script>