blob: e0c09ae94ac45296af4f6b5c41b55e94538bc5ff [file] [log] [blame]
<!DOCTYPE html>
<html>
<style type="text/css" media="screen">
.test {
position: relative;
top: -10px; /* overlap video */
width: 100px;
height: 100px;
background-color: white;
text-indent: -10000px;
}
#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 = testRunner.layerTreeAsText();
testRunner.notifyDone();
}
}
</script>
<head>
</head>
<body>
<!-- Go into compositing without transforms. -->
<video src="../resources/video.mp4"></video>
<div class="test">
Test
</div>
<div id="fading">
Fader
</div>
<pre id="layers">Layer tree goes here in DRT</pre>
<script>
// Wait for video to load to get compositing before the fade.
var video = document.getElementsByTagName('video')[0];
video.addEventListener('canplaythrough', startFade, false);
</script>
</body>
</html>