| <head> |
| <script> |
| function runTest() |
| { |
| if (window.layoutTestController) |
| layoutTestController.dumpAsText(); |
| |
| var styleElement = document.createElement('style'); |
| var styleSheet = styleElement.sheet; |
| styleElement = null; |
| |
| // create lots of objects to force a garbage collection |
| var i = 0; |
| var s; |
| while (i < 5000) { |
| i = i+1.11; |
| s = s + " "; |
| } |
| |
| styleSheet.ownerNode.cloneNode(); |
| |
| document.getElementById("result").innerHTML = "Test passed."; |
| } |
| </script> |
| </head> |
| <body onload="runTest()"> |
| <p> |
| This test verifies that style sheets do not outlive their elements. |
| Since you can get back to the element with the ownerNode attribute, |
| it's important to keep the element alive. |
| </p> |
| <p id="result">TEST HAS NOT RUN YET.</p> |
| </body> |