tor-browser

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

has-trust-token-with-no-top-frame.tentative.https.html (832B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Tests the Private Token API's hasPrivateToken behavior in documents with no top frame</title>
      4 <link rel="help" href="https://github.com/WICG/trust-token-api" />
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 
      8 <body>
      9  <script>
     10    'use strict';
     11 
     12    const frame = document.createElement('iframe');
     13    document.body.appendChild(frame);
     14    const cachedDocument = window[0].document;
     15    const IFrameDOMException = frame.contentWindow.DOMException;
     16    frame.remove();
     17 
     18    promise_test(async t => {
     19      await promise_rejects_dom(
     20          t, 'InvalidStateError', IFrameDOMException,
     21          cachedDocument.hasPrivateToken("https://issuer.example"));
     22    }, 'hasPrivateToken in a destroyed document.');
     23  </script>
     24 </body>