| <title>Video with poster</title> |
| document.getElementById('result').innerHTML += str + "<br>"; |
| return window.internals.layerTreeAsText(document) != ""; |
| function checkLayers(prefix, wantsLayers) |
| var layers = hasLayers(); |
| log(prefix + " <br> " + (wantsLayers == layers ? "PASS" : "FAIL") + ": wants layers = " + wantsLayers + ", has layers = " + layers); |
| var video = document.getElementsByTagName('video')[0]; |
| checkLayers("No src, no poster", false); |
| video.src = "../resources/video." + (video.canPlayType("video/ogg") ? "ogv" : "mp4"); |
| video.poster = "../resources/apple.jpg"; |
| checkLayers("Displaying poster", false); |
| checkLayers("Displaying movie", true); |
| testRunner.waitUntilDone(); |
| window.addEventListener('load', layerTest, false); |
| <video oncanplaythrough="layerTest()" onseeked="layerTest()"></video> |
| <p>A <video> should not have a layer until playback begins.<br> |
| This test can not be run manually, it requires testRunner.layerTreeAsText.</p> |