blob: fbfd05d40e5459a3c5b46fb85a6ba4d07dd38abe [file] [log] [blame]
<!DOCTYPE html>
<html>
<style type="text/css" media="screen">
.test {
position: relative;
top: -10px; /* overlap composited layer */
width: 100px;
height: 100px;
background-color: white;
text-indent: -10000px;
}
.compositing {
width: 1px;
height: 1px;
-webkit-transform: translateZ(0);
}
#fading {
opacity: 0;
-webkit-transition: opacity 0.1s;
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
function startFade()
{
// At the end of this fade we are interested in the size of .test in the layer dump.
// It should be constrained to the size of the view, so not tiled.
var fader = document.getElementById('fading');
fader.addEventListener('webkitTransitionEnd', fadeDone, false);
document.getElementById('fading').style.opacity = 1;
}
function fadeDone()
{
if (window.testRunner) {
document.getElementById('layers').innerText = window.internals.layerTreeAsText(document);
testRunner.notifyDone();
}
}
</script>
<head>
</head>
<body>
<!-- Go into compositing. -->
<div class="compositing"></div>
<div class="test">
Test
</div>
<div id="fading">
Fader
</div>
<pre id="layers">Layer tree goes here in DRT</pre>
<script>
window.onload = startFade;
</script>
</body>
</html>