https://github.com/web-platform-tests/wpt
Raw File
Tip revision: bf0b0da813543d6f58646c2b65a399b417a4d4ba authored by Anne van Kesteren on 11 August 2016, 12:41:28 UTC
WIP
Tip revision: bf0b0da
rejections.https.html
<!DOCTYPE html>
<title>Service Worker: Rejection Types</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>

(function() {
    var t = async_test('Rejections are DOMExceptions');
    t.step(function() {

        navigator.serviceWorker.register('http://example.com').then(
            t.step_func(function() { assert_unreached('Registration should fail'); }),
            t.step_func(function(reason) {
                assert_true(reason instanceof DOMException);
                assert_true(reason instanceof Error);
                t.done();
            }));
    });
}());

</script>
back to top