tor-browser

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

test_bug629227.html (1066B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=629227
      5 -->
      6 <head>
      7  <title>Test for Bug 629227</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>
     12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=629227">Mozilla Bug 629227</a>
     13 <p id="display">
     14  <iframe id="testTarget"></iframe>
     15 </p>
     16 <div id="content" style="display: none">
     17  
     18 </div>
     19 <pre id="test">
     20 <script type="application/javascript">
     21 
     22 /** Test for Bug 629227 **/
     23 SimpleTest.waitForExplicitFinish();
     24 
     25 $("testTarget").src =
     26  "http://test1.example.org" +
     27  location.pathname.replace(/test_bug629227.html/, "file1_bug629227.html");
     28 
     29 window.onmessage = function(ev) {
     30  if (ev.data == "finish") {
     31    SimpleTest.finish();
     32  } else {
     33    var data = JSON.parse(ev.data);
     34    if ("ok" in data) {
     35      ok(data.ok, data.reason);
     36    }
     37  }
     38 }
     39 
     40 addLoadEvent(function() {
     41  $("testTarget").contentWindow.postMessage("start", "*");
     42 });
     43 
     44 </script>
     45 </pre>
     46 </body>
     47 </html>