dom/tests/mochitest/bugs/test_bug876098.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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 type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    10   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    11   <script type="application/javascript">
    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   })();
    26   SpecialPowers.gc();
    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   }
    38   ok(allHaveProp(), "All spans should have the property we added");
    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">
    48 </div>
    49 <pre id="test">
    50 </pre>
    51 </body>
    52 </html>

mercurial