<!DOCTYPE html>
<html>
<head>
<style>
.box {
height: 150px;
width: 150px;
}
div {
width: 150px;
margin: 5px;
padding: 5px;
border: 1px solid black;
}
.hidden {
visibility: hidden;
}
.visible {
visibility: visible;
background-color: green;
}
.composited {
transform: translateZ(1px);
}
</style>
<script src="../resources/media-testing.js"></script>
<script type="text/javascript" charset="utf-8">
var counter = 0;
function notifyVideoDone() {
counter = counter + 1;
if ((counter === 3) && (window.testRunner))
testRunner.notifyDone();
}
function doTest()
{
setupVideo(document.getElementsByTagName('video')[0], '../resources/video.ogv', notifyVideoDone);
setupVideo(document.getElementsByTagName('video')[1], '../resources/video.ogv', notifyVideoDone);
setupVideo(document.getElementsByTagName('video')[2], '../resources/video.ogv', notifyVideoDone);
}
</script>
</head>
<body onload="doTest()">
<!-- Tests CSS visibility flag for composited video layers. -->
<!-- Pixel test only. Only the top video should be visible, the other two should be hidden (borders should remain visible) -->
<div><video class="visible composited box"></video></div>
<div><video class="hidden box"></video></div>
<div><video class="hidden composited box"></video></div>
</body>
</html>