tor-browser

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

test_bug637644.html (1481B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=637644
      5 -->
      6 <head>
      7  <title>Test for Bug 637644</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <script src="/tests/SimpleTest/WindowSnapshot.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=637644">Mozilla Bug 637644</a>
     14 <p id="display"></p>
     15 <div id="content" style="display: none">
     16  
     17 </div>
     18 <pre id="test">
     19 <script type="application/javascript">
     20 
     21 /** Test for Bug 637644 */
     22 SimpleTest.waitForExplicitFinish();
     23 
     24 addLoadEvent(function() {
     25 var win1 = window.open("", "", "height=500,width=500");
     26 win1.document.body.textContent = "Should show";
     27 
     28 var windowsLoaded = 0;
     29 
     30 window.onmessage = async function(ev) {
     31  is(ev.data, "loaded", "Message should be 'loaded'");
     32  if (++windowsLoaded == 2) {
     33    var one = await snapshotWindow(win1);
     34    var two = await snapshotWindow(win2);
     35    var three = await snapshotWindow(win3);
     36    win1.close();
     37    win2.close();
     38    win3.close();
     39    ok(compareSnapshots(one, two, true)[0], "Popups should look identical");
     40    ok(compareSnapshots(one, three, false)[0], "Popups should not look identical");
     41 
     42    SimpleTest.finish();
     43  }
     44 };
     45 
     46 var win2 = window.open("file_bug637644_1.html", "", "height=500,width=500");
     47 var win3 = window.open("file_bug637644_2.html", "", "height=500,width=500");
     48 });
     49 </script>
     50 </pre>
     51 </body>
     52 </html>