<html>
<head>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<style>
iframe {
height: 150px;
width: 150px;
}
</style>
<script>
if (window.internals) {
internals.settings.setPreferCompositingToLCDTextEnabled(true);
}
function doTest()
{
if (window.testRunner)
testRunner.waitUntilDone();
runAfterLayoutAndPaint(function() {
var iframe = document.getElementById("parent-iframe");
var box = iframe.contentDocument.getElementById("box");
box.setAttribute("style", "height:500px;width:500px;");
iframe.contentDocument.body.offsetWidth; // See bug 41999
if (window.testRunner) {
testRunner.dumpAsText();
document.getElementById('layertree').innerText = internals.layerTreeAsText(document);
testRunner.notifyDone();
}
});
}
window.addEventListener("load", doTest, false);
</script>
</head>
<body>
<iframe id="parent-iframe" src="resources/subframe-small.html"></iframe>
<pre id="layertree"></p>
</body>
</html>