tor-browser

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

test_bug1808352b.html (743B)


      1 <!doctype html>
      2 <meta charset=utf-8>
      3 <title>Test for Bug 1808352</title>
      4 <script src="/tests/SimpleTest/SimpleTest.js"></script>
      5 <div id=log></div>
      6 <div id="testnode"></div>
      7 <script>
      8 var w;
      9 function loadedFrame() {
     10    var node = document.getElementById("testnode");
     11    w.document.adoptNode(node);
     12    document.adoptNode(node);
     13    var res;
     14    // Use a loop to ensure the JITs optimize the `id` getter access.
     15    for (var i = 0; i < 10_000; i++) {
     16        res = node.id;
     17    }
     18    is(res, "testnode", "expected node id");
     19    w.close();
     20    SimpleTest.finish();
     21 }
     22 SimpleTest.waitForExplicitFinish();
     23 // Open a popup window, so it'll be same origin, but cross compartment.
     24 w = window.open("file_bug1808352b_frame.html", "_blank");
     25 </script>