2009-06-26 00:25:17 -07:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html class="reftest-wait">
|
|
|
|
<!-- Test: Create video, load. Add poster frame, load again, poster should show. -->
|
|
|
|
<script>
|
|
|
|
function runTest() {
|
|
|
|
var v = document.createElement('video');
|
|
|
|
|
|
|
|
var endTest = function() {
|
|
|
|
setTimeout(function(){document.documentElement.className = '';}, 0);
|
|
|
|
};
|
|
|
|
|
|
|
|
var addPoster = function() {
|
|
|
|
v.removeEventListener('loadeddata', addPoster, false);
|
2012-05-11 01:32:15 -07:00
|
|
|
v.poster = "blue140x100.png";
|
2009-06-26 00:25:17 -07:00
|
|
|
v.addEventListener('loadeddata', endTest, false);
|
|
|
|
v.load();
|
|
|
|
};
|
|
|
|
|
|
|
|
v.addEventListener('loadeddata', addPoster, false);
|
|
|
|
v.id = 'v';
|
|
|
|
v.src = "black140x100.ogv";
|
2010-08-19 15:50:37 -07:00
|
|
|
v.preload = "auto";
|
2009-06-26 00:25:17 -07:00
|
|
|
document.body.appendChild(v);
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
<body style="background:white;" onload="runTest();">
|
|
|
|
</body>
|
|
|
|
</html>
|