https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 858dccf8a31476e97a978c4a433eb1766270ae8e authored by Anne van Kesteren on 15 October 2018, 09:37:30 UTC
no hex or oct digits
Tip revision: 858dccf
callback-exception.html
<!doctype html>
<meta charset=utf-8>
<title>requestIdleCallback callback exception reported to error handler</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id="log"></div>
<script>
  var custom_exception = 'requestIdleCallbackException';
  setup({allow_uncaught_exception : true});
  async_test(function (t) {
    assert_false(document.hidden, "document.hidden must exist and be false to run this test properly");
    addEventListener("error",function(e) {
      t.step(function() {
        assert_equals(e.error.message, custom_exception);
        t.done();
      })
    });
    window.requestIdleCallback(function () {
      throw new Error(custom_exception);
    });
  }, "requestIdleCallback callback exceptions are reported to error handler");
</script>
back to top