[Modern Media Controls] Turn media/modern-media-controls/ios-inline-media-controls...
[WebKit-https.git] / LayoutTests / media / video-poster-background.html
1 <html>
2     <head>
3         <style>
4             video { background-color: red; }
5             .clip {
6                 width: 352;
7                 height: 200;
8                 overflow: hidden;
9             }
10         </style>
11         <script src="media-file.js"></script>
12         <script type="text/javascript">
13             if (window.testRunner)
14                 testRunner.waitUntilDone();
15
16             function doTest() {
17                 video = document.getElementsByTagName('video')[0];
18                 video.addEventListener('canplaythrough', canPlayThrough, false);
19                 video.src = findMediaFile('video', 'content/counting');
20             }
21             function canPlayThrough() {
22                 video.addEventListener('seeked', seeked, false);
23                 video.currentTime = 0.01;
24             }
25             function seeked() {
26                 if (window.testRunner)
27                     testRunner.notifyDone();
28             }
29         </script>
30     </head>
31     <body onload="doTest()">
32         <!-- This tests whether a video with a poster attribute correctly paints its background color after a video frame is painted. The page should render only a red box 352x200. -->
33         <div class="clip">
34             <video width=352 height=688 poster="content/counting.jpg"></video>
35         </div>
36     </body>
37 </html>