tor-browser

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

fetch.https.sub.any.js (2026B)


      1 // META: global=window,worker
      2 // META: script=/fetch/metadata/resources/helper.js
      3 
      4 // Site
      5 promise_test(t => {
      6  return validate_expectations_custom_url("https://{{host}}:{{ports[https][0]}}/fetch/metadata/resources/echo-as-json.py", {}, {
      7          "site": "same-origin",
      8          "user": "",
      9          "mode": "cors",
     10          "dest": "empty"
     11        }, "Same-origin fetch");
     12 }, "Same-origin fetch");
     13 
     14 promise_test(t => {
     15  return validate_expectations_custom_url("https://{{hosts[][www]}}:{{ports[https][0]}}/fetch/metadata/resources/echo-as-json.py", {}, {
     16          "site": "same-site",
     17          "user": "",
     18          "mode": "cors",
     19          "dest": "empty"
     20        }, "Same-site fetch");
     21 }, "Same-site fetch");
     22 
     23 promise_test(t => {
     24  return validate_expectations_custom_url("https://{{hosts[alt][www]}}:{{ports[https][0]}}/fetch/metadata/resources/echo-as-json.py", {}, {
     25          "site": "cross-site",
     26          "user": "",
     27          "mode": "cors",
     28          "dest": "empty"
     29        }, "Cross-site fetch");
     30 }, "Cross-site fetch");
     31 
     32 // Mode
     33 promise_test(t => {
     34  return validate_expectations_custom_url("https://{{host}}:{{ports[https][0]}}/fetch/metadata/resources/echo-as-json.py", {mode: "same-origin"}, {
     35          "site": "same-origin",
     36          "user": "",
     37          "mode": "same-origin",
     38          "dest": "empty"
     39        }, "Same-origin mode");
     40 }, "Same-origin mode");
     41 
     42 promise_test(t => {
     43  return validate_expectations_custom_url("https://{{host}}:{{ports[https][0]}}/fetch/metadata/resources/echo-as-json.py", {mode: "cors"}, {
     44          "site": "same-origin",
     45          "user": "",
     46          "mode": "cors",
     47          "dest": "empty"
     48        }, "CORS mode");
     49 }, "CORS mode");
     50 
     51 promise_test(t => {
     52  return validate_expectations_custom_url("https://{{host}}:{{ports[https][0]}}/fetch/metadata/resources/echo-as-json.py", {mode: "no-cors"}, {
     53          "site": "same-origin",
     54          "user": "",
     55          "mode": "no-cors",
     56          "dest": "empty"
     57        }, "no-CORS mode");
     58 }, "no-CORS mode");