tor-browser

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

test_bug530396.html (1526B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=530396
      5 -->
      6 <head>
      7  <title>Test for Bug 530396</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <script src="/tests/SimpleTest/EventUtils.js"></script>
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     11 </head>
     12 <body>
     13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=530396">Mozilla Bug 530396</a>
     14 
     15 <p>
     16 
     17 <iframe id="testFrame" src="http://mochi.test:8888/tests/docshell/test/mochitest/bug530396-subframe.html"></iframe>
     18 
     19 <pre id="test">
     20 <script class="testbody" type="text/javascript">
     21 
     22 // NOTE: If we ever make subframes do bfcache stuff, this test will need to be
     23 // modified accordingly!  It assumes that subframes do NOT get bfcached.
     24 var onloadCount = 0;
     25 
     26 var step = 0;
     27 
     28 var gTestFrame = document.getElementById("testFrame");
     29 
     30 SimpleTest.waitForExplicitFinish();
     31 SimpleTest.requestFlakyTimeout("untriaged");
     32 addLoadEvent(doNextStep);
     33 
     34 function doNextStep() {
     35  ++step;
     36  switch (step) {
     37    case 1:
     38      is(onloadCount, 1, "Loaded initial page");
     39      sendMouseEvent({type: "click"}, "target2", gTestFrame.contentWindow);
     40      window.setTimeout(doNextStep, 1000);
     41      break;
     42 
     43    case 2:
     44      is(onloadCount, 1, "opener must be null");
     45      sendMouseEvent({type: "click"}, "target1", gTestFrame.contentWindow);
     46      break;
     47 
     48    case 3:
     49      is(onloadCount, 2, "don't send referrer with rel=referrer");
     50      SimpleTest.finish();
     51      break;
     52  }
     53 }
     54 </script>
     55 </pre>
     56 </html>