tor-browser

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

test_bug876098.html (1246B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=876098
      5 -->
      6 <head>
      7  <meta charset="utf-8">
      8  <title>Test for Bug 876098</title>
      9  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     11  <script type="application/javascript">
     12 
     13  /** Test for Bug 876098 */
     14  var div = document.createElement("div");
     15  // count has to be large enough to trigger ion-compilation
     16  var count = 2000;
     17  // Separate function to make sure nothing weird we do block the ion-compile
     18  (function() {
     19    for (var i = 0; i < count; ++i) {
     20      var span = document.createElement("span");
     21      span.x = "foo";
     22      div.appendChild(span);
     23    }
     24  })();
     25 
     26  SpecialPowers.gc();
     27 
     28  function allHaveProp() {
     29    var kids = div.childNodes;
     30    for (var i = 0; i < count; ++i) {
     31      if (kids[i].x != "foo") {
     32        return false;
     33      }
     34    }
     35    return true;
     36  }
     37 
     38  ok(allHaveProp(), "All spans should have the property we added");
     39 
     40 
     41  </script>
     42 </head>
     43 <body>
     44 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=876098">Mozilla Bug 876098</a>
     45 <p id="display"></p>
     46 <div id="content" style="display: none">
     47 
     48 </div>
     49 <pre id="test">
     50 </pre>
     51 </body>
     52 </html>