tor-browser

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

test_bug1163743.html (1165B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 This checks if the origin-when-crossorigin policy works.
      5 https://bugzilla.mozilla.org/show_bug.cgi?id=1163743
      6 -->
      7 
      8 <head>
      9  <meta charset="utf-8">
     10  <title>Test policies for Bug 1163743</title>
     11  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     12  <script type="application/javascript" src="referrerHelper.js"></script>
     13  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     14 
     15 <script type="application/javascript">
     16 
     17 SimpleTest.waitForExplicitFinish();
     18 var advance = function() { tests.next(); };
     19 
     20 /**
     21 * testing legacy support for origin-when-crossorigin (1163743)
     22 */
     23 var tests = (function*() {
     24  var iframe = document.getElementById("testframe");
     25  const sjs = "/tests/dom/base/test/bug704320.sjs?action=generate-policy-test";
     26 
     27  // origin when crossorigin (trimming whitespace)
     28  yield resetCounter();
     29  yield iframe.src = sjs + "&policy=" + escape(' origin-when-crossorigin');
     30  yield checkIndividualResults("origin-when-cross-origin", ["origin", "full"]);
     31 
     32  // complete.
     33  SimpleTest.finish();
     34 })();
     35 
     36 </script>
     37 </head>
     38 
     39 <body onload="tests.next();">
     40  <iframe id="testframe"></iframe>
     41 
     42 </body>
     43 </html>