Add new access object callback
[framework/web/webkit-efl.git] / LayoutTests / media / video-poster-blocked-by-willsendrequest.html
1 <!doctype html>
2 <html>
3     <head>
4         <style>
5             video {
6                 border: 3px solid red;
7                 background-color: magenta;
8             }
9         </style>
10
11         <script src=video-test.js></script>
12         <script>
13         
14             var width, height;
15         
16             function testAfterLoadingPoster()
17             {
18                 consoleWrite("<br><b>Test after setting poster</b>");
19
20                 testExpected("video.clientWidth", 300);
21                 testExpected("video.clientHeight", 150);
22
23                 endTest();
24             }
25
26             function start()
27             {
28                 if (window.testRunner) {
29                     testRunner.dumpAsText();
30                     testRunner.setWillSendRequestReturnsNull(true);
31                 } else
32                     consoleWrite("<b>This test can only be run in DumpRenderTree!</b>");
33
34                 video = document.querySelectorAll('video')[0];
35
36                 consoleWrite("<br><b>Testing before setting poster</b>");
37                 testExpected("video.clientWidth", 300);
38                 testExpected("video.clientHeight", 150);
39
40                 video.poster = "content/abe.png";
41
42                 setTimeout(testAfterLoadingPoster, 100);
43             }
44         </script>
45     </head>
46
47     <body onload="start()">
48         <video id=video></video>
49         <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=65270">https://bugs.webkit.org/show_bug.cgi?id=65270</a>. <br>
50         Resource load delegate should be able to block poster loading.</p>
51     </body>
52 </html>