tor-browser

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

fetch-on-the-right-interface.https.any.js (749B)


      1 // META: title=fetch method on the right interface
      2 // META: global=serviceworker
      3 
      4 test(function() {
      5    assert_false(self.hasOwnProperty('fetch'), 'ServiceWorkerGlobalScope ' +
      6        'instance should not have "fetch" method as its property.');
      7    assert_inherits(self, 'fetch', 'ServiceWorkerGlobalScope should ' +
      8        'inherit "fetch" method.');
      9    assert_own_property(Object.getPrototypeOf(Object.getPrototypeOf(self)), 'fetch',
     10        'WorkerGlobalScope should have "fetch" propery in its prototype.');
     11    assert_equals(self.fetch, Object.getPrototypeOf(Object.getPrototypeOf(self)).fetch,
     12        'ServiceWorkerGlobalScope.fetch should be the same as ' +
     13        'WorkerGlobalScope.fetch.');
     14 }, 'Fetch method on the right interface');