tor-browser

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

origin.sub.any.js (702B)


      1 // META: global=window,worker
      2 
      3 for (const method of ["compileStreaming", "instantiateStreaming"]) {
      4  promise_test(t => {
      5    const url = "http://{{domains[www]}}:{{ports[http][0]}}/wasm/incrementer.wasm";
      6    const response = fetch(url, { "mode": "no-cors" });
      7    return promise_rejects_js(t, TypeError, WebAssembly[method](response));
      8  }, `Opaque response: ${method}`);
      9 
     10  promise_test(t => {
     11    const url = "/fetch/api/resources/redirect.py?redirect_status=301&location=/wasm/incrementer.wasm";
     12    const response = fetch(url, { "mode": "no-cors", "redirect": "manual" });
     13    return promise_rejects_js(t, TypeError, WebAssembly[method](response));
     14  }, `Opaque redirect response: ${method}`);
     15 }