blob: 1fcfb6e835062541f2539197b8da22ae56031424 [file] [log] [blame]
<!doctype HTML>
<style>
#child {
position: relative;
}
</style>
<div style="backface-visibility: hidden;">
<div id="target">
<div id="child"></div>
<div style="position: relative;">
<span id="myspan">gone!</span>
</div>
</div>
</div>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
var t = async_test();
function runTest() {
var content = document.createElement("span");
var div = document.createElement("div");
div.appendChild(content);
div.id = "child";
target.replaceChild(div, child);
requestAnimationFrame(t.step_func_done(checkResult));
}
function checkResult() {
var clientRect = internals.visualRect(myspan.firstChild);
// Check that the visual rect for the child has been initialized
// to a non-zero (and hence presumably correct) size.
assert_true(clientRect.width > 0);
assert_true(clientRect.height > 0);
}
onload = function() {
requestAnimationFrame(function() {
requestAnimationFrame(t.step_func(runTest));
});
}
</script>