gecko-dev/testing/web-platform/tests/background-fetch/idlharness.https.any.js
Philip Jägenstedt ade8bf4b2b Bug 1526848 [wpt PR 14952] - Remove two uses of dedicated-workers.idl, a=testonly
Automatic update from web-platform-tests
Remove two uses of dedicated-workers.idl (#14952)

Prerequisite for https://github.com/web-platform-tests/wpt/pull/12803.
--

wpt-commits: 45b6a5be22e5ea7596c55f5d1e65bae5e62e1656
wpt-pr: 14952
2019-02-26 12:05:17 +00:00

24 lines
730 B
JavaScript

// META: global=window,worker
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
'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")'],
});
}
}
);