tor-browser

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

header-parsing-successes.https.html (1175B)


      1 <!doctype html>
      2 <meta charset=utf-8>
      3 <meta name=timeout content=long>
      4 <script src=/resources/testharness.js></script>
      5 <script src=/resources/testharnessreport.js></script>
      6 <script src="/common/dispatcher/dispatcher.js"></script>
      7 <script src="/common/get-host-info.sub.js"></script>
      8 <script src="/common/utils.js"></script>
      9 <script src="resources/common.js"></script>
     10 <script src="resources/popup-test.js"></script>
     11 <script>
     12 
     13 [
     14  // All of the following should be recognized as "same-origin" (hence the
     15  // severed opener link).
     16  {
     17    "title": "coop with leading space",
     18    "coop": " same-origin",
     19  },
     20  {
     21    "title": "coop with trailing space",
     22    "coop": "same-origin ",
     23  },
     24  {
     25    "title": "coop with leading tab",
     26    "coop": "\tsame-origin",
     27  },
     28  {
     29    "title": "coop with trailing tab",
     30    "coop": "same-origin\t",
     31  },
     32  {
     33    "title": "coop with duplicate value, separated by semi-column",
     34    "coop": "same-origin;same-origin",
     35  },
     36  {
     37    "title": "coop with valid structured header",
     38    "coop": "same-origin; foo=bar",
     39  }
     40 ].forEach(variant => {
     41  popup_test(`Parsing ${variant.title}`, SAME_ORIGIN, { coop: variant.coop }, "severed");
     42 });
     43 
     44 </script>