36 lines
1.3 KiB
HTML
36 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<title>video-poster-not-found</title>
|
|
<script src=video-test.js></script>
|
|
<script src="media-file.js"></script>
|
|
|
|
<script>
|
|
function go()
|
|
{
|
|
findMediaElement();
|
|
run('video.src = findMediaFile("video", "content/test")');
|
|
waitForEventOnce('canplaythrough', canplaythrough);
|
|
}
|
|
|
|
function canplaythrough()
|
|
{
|
|
// When only the width attribute is given and the height attribute is missing,
|
|
// for an image element, if it cannot download the image (a broken url?),
|
|
// the historical WebKit behavior is to set the aspect ratio of the element to 1.
|
|
// However, for a video element, if the poster image cannot be downloaded,
|
|
// the aspect ratio of the element should not be hardcoded 1, instead, it must be decided by the video content.
|
|
testExpected("video.clientWidth", 320);
|
|
testExpected("video.clientHeight", 240);
|
|
endTest();
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body onload="go()">
|
|
<video width=320 poster="notfound.jpg"></video>
|
|
<p>Test <video> element with only width attribute and the poster is missing (cannot be downloaded).</p>
|
|
</body>
|
|
</html>
|