tor-browser

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

test_sync_xhr_unload.html (856B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title>Test for Bug 1307122</title>
      6  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      7  <script type="application/javascript" src="common_temporaryFileBlob.js"></script>
      8  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
      9 </head>
     10 <body>
     11  <script type="application/javascript">
     12 
     13 SimpleTest.waitForExplicitFinish();
     14 
     15 info("Creating the iframe...");
     16 var ifr = document.createElement('iframe');
     17 
     18 ifr.addEventListener("load", function ifr_load1() {
     19  info("Iframe loaded");
     20 
     21  ifr.removeEventListener("load", ifr_load1);
     22  ifr.src = "empty.html";
     23 
     24  ifr.addEventListener("load", function ifr_load2() {
     25    ok(true, "Test passed");
     26    SimpleTest.finish();
     27  });
     28 
     29 });
     30 
     31 ifr.src = "iframe_sync_xhr_unload.html";
     32 document.body.appendChild(ifr);
     33 
     34  </script>
     35 </body>
     36 </html>