mirror of
https://github.com/ManchildProductions/UXP-Fixed.git
synced 2026-06-20 18:08:43 +00:00
22 lines
656 B
HTML
22 lines
656 B
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>
|