<!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
iframe {
border: 10px solid black;
padding: 5px;
margin: 50px;
height: 170px;
width: 320px;
float: left;
}
#overlay {
position: absolute;
width: 150px;
height: 50px;
top: 5px;
left: 5px;
background-color: rgba(0, 0, 0, 0.6);
}
pre {
clear: both;
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.testRunner)
testRunner.dumpAsText();
function doTest()
{
document.getElementById('overlay').style.height = '150px';
if (window.internals) {
document.getElementById('layers').innerHTML = internals.layerTreeAsText(document);
}
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<!-- Test that the parent document becomes composited when the iframe becomes overlapped. -->
<!-- The iframe does not start with a Layer. -->
<iframe id="iframe" src="resources/composited-subframe.html"></iframe>
<div id="overlay">
</div>
<pre id="layers">Layer tree appears here in DRT.</pre>
</body>
</html>