fune/testing/web-platform/tests/background-sync/idlharness.https.any.js
Philip Jägenstedt d681b6975c Bug 1791158 [wpt PR 35929] - Rename BackgroundSync/ to background-sync/, a=testonly
Automatic update from web-platform-tests
Rename BackgroundSync/ to background-sync/

This is to match the (unofficial) spec name:
https://wicg.github.io/background-sync/spec/

--

wpt-commits: 4a4b36a62db50238cf89275cdc12ff056a974f9f
wpt-pr: 35929
2022-09-23 22:53:05 +00:00

23 lines
618 B
JavaScript

// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// META: timeout=long
'use strict';
// https://wicg.github.io/background-sync/spec/
idl_test(
['background-sync'],
['service-workers', 'html', 'dom'],
idlArray => {
const isServiceWorker = location.pathname.includes('.serviceworker.');
if (isServiceWorker) {
idlArray.add_objects({
ServiceWorkerGlobalScope: ['self', 'onsync'],
ServiceWorkerRegistration: ['registration'],
SyncManager: ['registration.sync'],
SyncEvent: ['new SyncEvent("tag", "lastChance")'],
});
}
}
);