tor-browser

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

multi-global-origin-serialization.sub.html (873B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Blob URL serialization (specifically the origin) in multi-global situations</title>
      4 <link rel="help" href="https://w3c.github.io/FileAPI/#unicodeBlobURL">
      5 <link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me">
      6 
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 
     10 <!-- this page is the entry global -->
     11 
     12 <iframe src="//{{domains[www]}}:{{location[port]}}/FileAPI/support/incumbent.sub.html"></iframe>
     13 
     14 <script>
     15 "use strict";
     16 setup({ single_test: true });
     17 document.domain = "{{host}}";
     18 
     19 window.onload = () => {
     20  const url = frames[0].createBlobURL();
     21  const desired = "blob:{{location[scheme]}}://www1";
     22  assert_equals(url.substring(0, desired.length), desired,
     23    "Origin should contain www1, from the current settings object");
     24  done();
     25 };
     26 </script>