blob: 61f517fdc7980a8b1666f6a19003cea4f3a29b34 [file] [log] [blame]
// META: global=window,worker
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// META: timeout=long
'use strict';
// https://wicg.github.io/background-fetch/
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")'],
});
}
}
);