blob: 1bb111dbc3fa38511f14ebbe3227a9b5e92d2993 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
iframe {
border: 10px solid black;
padding: 5px;
margin: 20px;
height: 150px;
width: 0;
}
.expanded {
width: 300px;
}
.overlay {
position: absolute;
width: 50px;
height: 50px;
top: 5px;
left: 5px;
background-color: rgba(0, 0, 0, 0.2);
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function doTest()
{
window.setTimeout(function() {
document.getElementById('iframe').className = 'expanded';
// Need to wait for compositing layers to be updated.
window.setTimeout(function() {
if (window.testRunner) {
document.getElementById('layers').innerHTML = window.internals.layerTreeAsText(document);
testRunner.notifyDone();
}
}, 0);
}, 0);
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<!-- The parent document may into compositing mode by the iframe. -->
<iframe id="iframe" src="resources/composited-subframe.html"></iframe>
<div class="overlay">
</div>
<pre id="layers">Layer tree appears here in DRT.</pre>
</body>
</html>