| OLD | NEW |
| (Empty) | |
| 1 <!doctype html> |
| 2 <meta charset=utf-8> |
| 3 <title>requestIdleCallback callback exception reported to error handler</title> |
| 4 <script src=/resources/testharness.js></script> |
| 5 <script src=/resources/testharnessreport.js></script> |
| 6 <div id="log"></div> |
| 7 <script> |
| 8 var custom_exception = 'requestIdleCallbackException'; |
| 9 setup({allow_uncaught_exception : true}); |
| 10 async_test(function (t) { |
| 11 assert_false(document.hidden, "document.hidden must exist and be false to ru
n this test properly"); |
| 12 addEventListener("error",function(e) { |
| 13 t.step(function() { |
| 14 assert_equals(e.error.message, custom_exception); |
| 15 t.done(); |
| 16 }) |
| 17 }); |
| 18 window.requestIdleCallback(function () { |
| 19 throw new Error(custom_exception); |
| 20 }); |
| 21 }, "requestIdleCallback callback exceptions are reported to error handler"); |
| 22 </script> |
| OLD | NEW |