4 <title><video
> intrinsic width/height
</title>
5 <script src=
"../resources/testharness.js"></script>
6 <script src=
"../resources/testharnessreport.js"></script>
10 <!-- These tests assume that the default intrinsic width is 300x150, so that the default
11 intrinsic ratio is 2:1. This is no longer per spec, but is what is implemented. -->
12 <video title=
"no width/height attributes"
13 data-expected-width=
"300" data-expected-height=
"150"></video>
14 <video title=
"only width attribute"
15 data-expected-width=
"100" data-expected-height=
"50"
17 <video title=
"only height attribute"
18 data-expected-width=
"200" data-expected-height=
"100"
20 <video title=
"both width/height attributes"
21 data-expected-width=
"100" data-expected-height=
"100"
22 width=
"100" height=
"100"></video>
23 <!-- A width:height ratio other than 2:1 and overriding the specified style must be used to
24 verify that width/height does not influence intrinsic ratio -->
25 <video title=
"both width/height attributes and style"
26 data-expected-width=
"300" data-expected-height=
"150"
27 width=
"100" height=
"100" style=
"width: auto; height: auto"></video>
29 Array
.prototype.forEach
.call(document
.querySelectorAll('video'), function(video
)
33 assert_equals(video
.clientWidth
, parseInt(video
.dataset
.expectedWidth
), "width");
34 assert_equals(video
.clientHeight
, parseInt(video
.dataset
.expectedHeight
), "height");