Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

// 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")'],
});
}
}
);