| OLD | NEW |
| (Empty) | |
| 1 <!doctype HTML> |
| 2 <style> |
| 3 #child { |
| 4 position: relative; |
| 5 } |
| 6 </style> |
| 7 <div style="backface-visibility: hidden;"> |
| 8 <div id="target"> |
| 9 <div id="child"></div> |
| 10 <div style="position: relative;"> |
| 11 <span id="myspan">gone!</span> |
| 12 </div> |
| 13 </div> |
| 14 </div> |
| 15 <script src="../../resources/testharness.js"></script> |
| 16 <script src="../resources/testharnessreport.js"></script> |
| 17 <script> |
| 18 |
| 19 function runTest() { |
| 20 var content = document.createElement("span"); |
| 21 var div = document.createElement("div"); |
| 22 div.appendChild(content); |
| 23 div.id = "child"; |
| 24 target.replaceChild(div, child); |
| 25 requestAnimationFrame(checkResult); |
| 26 } |
| 27 |
| 28 function checkResult() { |
| 29 if (window.internals) { |
| 30 var clientRect = window.internals.visualRect(myspan.firstChild); |
| 31 test(function() { |
| 32 // Check that the visual rect for the child has been initialized |
| 33 // to a non-zero (and hence presumably correct) size. |
| 34 assert_true(clientRect.width > 0); |
| 35 assert_true(clientRect.height > 0); |
| 36 }); |
| 37 } |
| 38 if (window.testRunner) |
| 39 testRunner.notifyDone(); |
| 40 } |
| 41 |
| 42 if (window.testRunner) { |
| 43 window.testRunner.waitUntilDone(); |
| 44 window.testRunner.dumpAsText(); |
| 45 } |
| 46 |
| 47 onload = function() { |
| 48 requestAnimationFrame(function() { |
| 49 requestAnimationFrame(function() { |
| 50 runTest(); |
| 51 }); |
| 52 }); |
| 53 } |
| 54 </script> |
| OLD | NEW |