OLD | NEW |
| (Empty) |
1 Test <video> element with and without a poster. | |
2 | |
3 Testing poster null, with 'width' and 'height' attributes. | |
4 EXPECTED (video.getAttribute('poster') == 'null') OK | |
5 EXPECTED (relativeURL(video.poster) == '') OK | |
6 EXPECTED (video.clientWidth == '320') OK | |
7 EXPECTED (video.clientHeight == '240') OK | |
8 | |
9 Setting poster to "content/greenbox.png" | |
10 Testing 25x25 poster 'content/greenbox.png', size should equal image size. | |
11 EXPECTED (video.getAttribute('poster') == 'content/greenbox.png') OK | |
12 EXPECTED (relativeURL(video.poster) == 'content/greenbox.png') OK | |
13 EXPECTED (video.clientWidth == '25') OK | |
14 EXPECTED (video.clientHeight == '25') OK | |
15 | |
16 Setting poster to "" | |
17 Testing poster '', with NO 'width' or 'height' attributes so size should be <vid
eo> default. | |
18 EXPECTED (video.getAttribute('poster') == '') OK | |
19 EXPECTED (relativeURL(video.poster) == 'video-poster.html') OK | |
20 EXPECTED (video.clientWidth == '300') OK | |
21 EXPECTED (video.clientHeight == '150') OK | |
22 | |
23 Setting poster to "content/abe.png" | |
24 Testing 76x103 poster 'content/abe.png', size should equal image size. | |
25 EXPECTED (video.getAttribute('poster') == 'content/abe.png') OK | |
26 EXPECTED (relativeURL(video.poster) == 'content/abe.png') OK | |
27 EXPECTED (video.clientWidth == '76') OK | |
28 EXPECTED (video.clientHeight == '103') OK | |
29 | |
30 Setting poster to "content/bogus.png" | |
31 Testing 300x150 poster 'content/bogus.png', invalid url so size should revert to
<video> default. | |
32 EXPECTED (video.getAttribute('poster') == 'content/bogus.png') OK | |
33 EXPECTED (relativeURL(video.poster) == 'content/bogus.png') OK | |
34 EXPECTED (video.clientWidth == '300') OK | |
35 EXPECTED (video.clientHeight == '150') OK | |
36 | |
37 Setting poster to "" | |
38 Testing poster '', with only a 'width' attribute so size should have the same as
pect ratio as <video> default. | |
39 EXPECTED (video.getAttribute('poster') == '') OK | |
40 EXPECTED (relativeURL(video.poster) == 'video-poster.html') OK | |
41 EXPECTED (video.clientWidth == '600') OK | |
42 EXPECTED (video.clientHeight == '300') OK | |
43 | |
44 Setting poster to "content/abe.png" | |
45 Testing 152x206 poster 'content/abe.png', with only a 'width' attribute so size
should equal a scaled up image size with the same aspect ratio as the original i
mage. | |
46 EXPECTED (video.getAttribute('poster') == 'content/abe.png') OK | |
47 EXPECTED (relativeURL(video.poster) == 'content/abe.png') OK | |
48 EXPECTED (video.clientWidth == '152') OK | |
49 EXPECTED (video.clientHeight == '206') OK | |
50 | |
51 Setting poster to "content/bogus.png" | |
52 Testing 600x300 poster 'content/bogus.png', invalid url w/ width attribute so si
ze should have the same aspect ratio as <video> default. | |
53 EXPECTED (video.getAttribute('poster') == 'content/bogus.png') OK | |
54 EXPECTED (relativeURL(video.poster) == 'content/bogus.png') OK | |
55 EXPECTED (video.clientWidth == '600') OK | |
56 EXPECTED (video.clientHeight == '300') OK | |
57 | |
58 END OF TEST | |
59 | |
OLD | NEW |