1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/tests/mochitest/bugs/test_bug876098.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,52 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=876098 1.8 +--> 1.9 +<head> 1.10 + <meta charset="utf-8"> 1.11 + <title>Test for Bug 876098</title> 1.12 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.13 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.14 + <script type="application/javascript"> 1.15 + 1.16 + /** Test for Bug 876098 **/ 1.17 + var div = document.createElement("div"); 1.18 + // count has to be large enough to trigger ion-compilation 1.19 + var count = 2000; 1.20 + // Separate function to make sure nothing weird we do block the ion-compile 1.21 + (function() { 1.22 + for (var i = 0; i < count; ++i) { 1.23 + var span = document.createElement("span"); 1.24 + span.x = "foo"; 1.25 + div.appendChild(span); 1.26 + } 1.27 + })(); 1.28 + 1.29 + SpecialPowers.gc(); 1.30 + 1.31 + function allHaveProp() { 1.32 + var kids = div.childNodes; 1.33 + for (var i = 0; i < count; ++i) { 1.34 + if (kids[i].x != "foo") { 1.35 + return false; 1.36 + } 1.37 + } 1.38 + return true; 1.39 + } 1.40 + 1.41 + ok(allHaveProp(), "All spans should have the property we added"); 1.42 + 1.43 + 1.44 + </script> 1.45 +</head> 1.46 +<body> 1.47 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=876098">Mozilla Bug 876098</a> 1.48 +<p id="display"></p> 1.49 +<div id="content" style="display: none"> 1.50 + 1.51 +</div> 1.52 +<pre id="test"> 1.53 +</pre> 1.54 +</body> 1.55 +</html>