Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 36 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /background-fetch/idlharness.https.any.html - WPT Dashboard Interop Dashboard
- /background-fetch/idlharness.https.any.serviceworker.html - WPT Dashboard Interop Dashboard
- /background-fetch/idlharness.https.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /background-fetch/idlharness.https.any.worker.html - WPT Dashboard Interop Dashboard
// META: global=window,worker
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// META: timeout=long
'use strict';
idl_test(
['background-fetch'],
['service-workers', 'html', 'dom'],
idl_array => {
const isServiceWorker = location.pathname.includes('.serviceworker.');
if (isServiceWorker) {
idl_array.add_objects({
ServiceWorkerGlobalScope: ['self'],
ServiceWorkerRegistration: ['registration'],
BackgroundFetchManager: ['registration.backgroundFetch'],
BackgroundFetchEvent: ['new BackgroundFetchEvent("type")'],
BackgroundFetchUpdateEvent: ['new BackgroundFetchUpdateEvent("type")'],
});
}
}
);