Revision 74377ff01a7b0779a0d0202d7c3c600b315addb0 authored by Ms2ger on 21 September 2018, 14:02:48 UTC, committed by Ms2ger on 21 September 2018, 14:21:28 UTC
1 parent 501cfb6
Raw File
idlharness.https.any.js
// 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', 'dedicated-workers', '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")'],
      });
    }
  }
);
back to top