blob: c11854c34a611e7fc95e1c0b482a7ad43cd03ab0 [file] [edit]
<!DOCTYPE html>
<html>
<head>
<title>object-fit, video</title>
<style>
video {
width: 120px;
height: 120px;
border: 1px solid blue;
background-color: gray;
margin: 10px;
}
</style>
<script src=media-file.js></script>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
window.addEventListener('load', event => {
let videos = Array.from(document.getElementsByTagName('video'));
let totalCount = videos.length;
var count = totalCount;
videos.forEach(video => {
video.src = findMediaFile('video', 'content/test');
video.requestVideoFrameCallback((now, metadata) => {
if (!--count && window.testRunner)
testRunner.notifyDone()
});
});
});
</script>
</head>
<body>
<video style="object-fit: fill"></video>
<video style="object-fit: contain"></video>
<video style="object-fit: cover"></video>
<video style="object-fit: none"></video>
<video style="object-fit: scale-down"></video>
</body>
</html>