зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1567840 [wpt PR 17969] - Add missing await to wpt/.../service-worker/update.https.html, a=testonly
Automatic update from web-platform-tests Add missing await to wpt/.../service-worker/update.https.html promise_reject returns a promise and needs await. Bug: n/a Change-Id: Ida68b118be05268d9e74c9c22886f9064537e700 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1708663 Reviewed-by: Kenichi Ishibashi <bashi@chromium.org> Commit-Queue: Makoto Shimazu <shimazu@chromium.org> Auto-Submit: Makoto Shimazu <shimazu@chromium.org> Cr-Commit-Position: refs/heads/master@{#679854} -- wpt-commits: d87759c3b651e96c71ea6ff40a481ef6c6bce620 wpt-pr: 17969
This commit is contained in:
Родитель
77f34dc919
Коммит
af733fa294
|
@ -75,7 +75,7 @@ promise_test(async t => {
|
||||||
await prepare_ready_registration(t, 'bad_mime_type');
|
await prepare_ready_registration(t, 'bad_mime_type');
|
||||||
t.add_cleanup(() => registration.unregister());
|
t.add_cleanup(() => registration.unregister());
|
||||||
|
|
||||||
promise_rejects(t, 'SecurityError', registration.update());
|
await promise_rejects(t, 'SecurityError', registration.update());
|
||||||
assert_active_only(registration, expected_url);
|
assert_active_only(registration, expected_url);
|
||||||
}, 'update() should fail when mime type is invalid.');
|
}, 'update() should fail when mime type is invalid.');
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ promise_test(async t => {
|
||||||
await prepare_ready_registration(t, 'redirect');
|
await prepare_ready_registration(t, 'redirect');
|
||||||
t.add_cleanup(() => registration.unregister());
|
t.add_cleanup(() => registration.unregister());
|
||||||
|
|
||||||
promise_rejects(t, new TypeError(), registration.update())
|
await promise_rejects(t, new TypeError(), registration.update());
|
||||||
assert_active_only(registration, expected_url);
|
assert_active_only(registration, expected_url);
|
||||||
}, 'update() should fail when a response for the main script is redirect.');
|
}, 'update() should fail when a response for the main script is redirect.');
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ promise_test(async t => {
|
||||||
await prepare_ready_registration(t, 'syntax_error');
|
await prepare_ready_registration(t, 'syntax_error');
|
||||||
t.add_cleanup(() => registration.unregister());
|
t.add_cleanup(() => registration.unregister());
|
||||||
|
|
||||||
promise_rejects(t, new TypeError(), registration.update());
|
await promise_rejects(t, new TypeError(), registration.update());
|
||||||
assert_active_only(registration, expected_url);
|
assert_active_only(registration, expected_url);
|
||||||
}, 'update() should fail when a new script contains a syntax error.');
|
}, 'update() should fail when a new script contains a syntax error.');
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ promise_test(async t => {
|
||||||
const frame = await with_iframe(SCOPE);
|
const frame = await with_iframe(SCOPE);
|
||||||
t.add_cleanup(() => frame.remove());
|
t.add_cleanup(() => frame.remove());
|
||||||
|
|
||||||
promise_rejects(
|
await promise_rejects(
|
||||||
t, new TypeError(),
|
t, new TypeError(),
|
||||||
Promise.all([registration.unregister(), registration.update()]));
|
Promise.all([registration.unregister(), registration.update()]));
|
||||||
}, 'update() should fail when the pending uninstall flag is set.')
|
}, 'update() should fail when the pending uninstall flag is set.')
|
||||||
|
|
Загрузка…
Ссылка в новой задаче