4 <title>object-fit, video
</title>
11 border:
1px solid blue;
12 background-color: gray;
16 .group
> *
> * { display: block; }
17 .group
> *:nth-child(
1)
> * { width:
100%; height:
100%; }
18 .group
> *:nth-child(
2)
> * { width:
100%; margin-top:
15px; }
19 .group
> *:nth-child(
3)
> * { height:
100%; margin-left:-
20px; }
20 .group
> *:nth-child(
4)
> * { margin-left:-
100px; margin-top:-
60px; }
21 .group
> *:nth-child(
5)
> * { width:
100%; margin-top:
15px; }
23 <script src=media-file.js
></script>
25 if (window
.testRunner
)
26 testRunner
.waitUntilDone();
30 setSrcByTagName("video", findMediaFile("video", "content/test"));
32 var totalCount
= document
.getElementsByTagName('video').length
;
33 var count
= totalCount
;
34 document
.addEventListener("canplaythrough", function () {
36 if (window
.testRunner
)
37 setTimeout(function() { testRunner
.notifyDone(); }, totalCount
* 150);
44 <body onload=
"init();">
46 <!-- Note about the first video here: There's no way to unlock a video from its
47 aspect ratio without using object-fit:fill, so we have to use it here as well
48 as in the test file. In order to actually being able to detect failures, use a
49 different background color. -->
50 <div style=
"background:salmon;"><video style=
"object-fit:fill;"></video></div>
51 <div><video></video></div>
52 <div><video></video></div>
53 <div><video></video></div>
54 <div><video></video></div>