mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 18:55:30 +00:00
Bug 1506089 [wpt PR 14002] - ServiceWorker: Add t.add_cleanup() in WPT tests., a=testonly
Automatic update from web-platform-testsServiceWorker: Add t.add_cleanup() in WPT tests. This CL adds t.add_cleanup() that calls service_worker_unregister() in WPT tests to ensure registrations are removed on test completion. Bug: 824647 Change-Id: Ieb790d4d7f63fc4810f6062d7e288aad1e88f45d Reviewed-on: https://chromium-review.googlesource.com/c/1328545 Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Matt Falkenhagen <falken@chromium.org> Cr-Commit-Position: refs/heads/master@{#608693} -- wpt-commits: ab42c6d20fe627c4580ca1f0d5f6fbd106cbe04f wpt-pr: 14002
This commit is contained in:
parent
72300c2a58
commit
ccf4c80cca
@ -13,6 +13,7 @@ function import_test(testCase) {
|
||||
navigator.serviceWorker.onmessage = resolve;
|
||||
});
|
||||
await service_worker_unregister(t, testCase.scriptURL);
|
||||
t.add_cleanup(() => service_worker_unregister(t, testCase.scriptURL));
|
||||
const registration = await navigator.serviceWorker.register(
|
||||
testCase.scriptURL,
|
||||
{ scope: testCase.scriptURL, type: 'module' });
|
||||
|
Loading…
Reference in New Issue
Block a user