tor-browser

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

test_bug540462.html (1023B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=540462
      5 -->
      6 <head>
      7  <title>Test for Bug 540462</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     10 </head>
     11 <body onload="runTest()">
     12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=540462">Mozilla Bug 540462</a>
     13 <p id="display"></p>
     14 <div id="content" style="display: none">
     15  
     16 </div>
     17 <pre id="test">
     18 <script type="application/javascript">
     19 
     20 /** Test for Bug 540462 */
     21 
     22 var win;
     23 function runTest() {
     24  win = window.open("file_bug540462.html", "", "width=100,height=100");
     25 }
     26 
     27 var dwlCount = 0;
     28 var originalURL;
     29 function documentWriteLoad() {
     30  if (++dwlCount == 1) {
     31    originalURL = win.document.body.firstChild.href;
     32  } else if (dwlCount == 2) {
     33    is(win.document.body.firstChild.href, originalURL, "Wrong href!");
     34    win.close();
     35    SimpleTest.finish();
     36  }
     37 }
     38 
     39 SimpleTest.waitForExplicitFinish();
     40 
     41 </script>
     42 </pre>
     43 </body>
     44 </html>