mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1256428 P7 Fix wpt update.https.html to expect TypeError per current spec. r=jdm
This commit is contained in:
parent
7358d7c977
commit
64b722ad6f
@ -2,6 +2,7 @@
|
||||
<title>Service Worker: Registration update()</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/testharness-helpers.js"></script>
|
||||
<script src="resources/test-helpers.sub.js"></script>
|
||||
<script>
|
||||
promise_test(function(t) {
|
||||
@ -108,19 +109,16 @@ promise_test(function(t) {
|
||||
.then(function(frame) {
|
||||
iframe = frame;
|
||||
|
||||
return Promise.all([registration.unregister(),
|
||||
registration.update()]);
|
||||
return assert_promise_rejects(
|
||||
Promise.all([registration.unregister(), registration.update()]),
|
||||
new TypeError(),
|
||||
'Calling update() while the uninstalling flag is set' +
|
||||
'should return a promise that rejects with an ' +
|
||||
'InvalidStateError.');
|
||||
})
|
||||
.then(
|
||||
unreached_fulfillment(t),
|
||||
function(e) {
|
||||
assert_throws('InvalidStateError', function() { throw e; },
|
||||
'Calling update() while the uninstalling flag is set' +
|
||||
'should return a promise that rejects with an ' +
|
||||
'InvalidStateError.');
|
||||
|
||||
iframe.remove();
|
||||
return t.done();
|
||||
.then(function() {
|
||||
iframe.remove();
|
||||
return t.done();
|
||||
});
|
||||
}, 'Update a registration.');
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user