tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

idlharness.https.any.js (752B)


      1 // META: global=window,worker
      2 // META: script=/resources/WebIDLParser.js
      3 // META: script=/resources/idlharness.js
      4 // META: timeout=long
      5 
      6 'use strict';
      7 
      8 // https://wicg.github.io/background-fetch/
      9 
     10 idl_test(
     11  ['background-fetch'],
     12  ['service-workers', 'html', 'dom'],
     13  idl_array => {
     14    const isServiceWorker = location.pathname.includes('.serviceworker.');
     15    if (isServiceWorker) {
     16      idl_array.add_objects({
     17        ServiceWorkerGlobalScope: ['self'],
     18        ServiceWorkerRegistration: ['registration'],
     19        BackgroundFetchManager: ['registration.backgroundFetch'],
     20        BackgroundFetchEvent: ['new BackgroundFetchEvent("type")'],
     21        BackgroundFetchUpdateEvent: ['new BackgroundFetchUpdateEvent("type")'],
     22      });
     23    }
     24  }
     25 );