Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /cookie-store/cookieStore_subscriptions_empty.https.window.html - WPT Dashboard Interop Dashboard
// META: script=/service-workers/service-worker/resources/test-helpers.sub.js
'use strict';
promise_test(async testCase => {
const registration = await service_worker_unregister_and_register(
testCase, 'resources/empty_sw.js', 'resources/does/not/exist');
testCase.add_cleanup(() => registration.unregister());
await wait_for_state(testCase, registration.installing, 'activated');
const subscriptions = await registration.cookies.getSubscriptions();
assert_equals(0, subscriptions.length);
}, 'Newly registered and activated service worker has no subscriptions');