tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / http / tests / media / video-cookie.html
1 <html>
2 <head>
3 </head>
4 <body onload="loadCookie()">
5 <video id="video"></video>
6 <script src=../../media-resources/video-test.js></script>
7 <script src=../../media-resources/media-file.js></script>
8 <script>
9     if (window.layoutTestController) {
10         layoutTestController.dumpAsText();
11         layoutTestController.setAlwaysAcceptCookies(true);
12         layoutTestController.waitUntilDone();
13     }
14
15     function loadCookie () {
16         var movie = findMediaFile("video", "resources/test");
17         var frame = document.createElement("iframe");
18         document.body.appendChild(frame);
19
20         frame.addEventListener('load', function () {
21                 video = document.getElementById('video');
22                 video.src="http://127.0.0.1:8000/media/resources/video-cookie-check-cookie.php";
23                 video.play();
24         });
25
26         frame.width = 0;
27         frame.height = 0;
28         frame.src = "http://127.0.0.1:8000/media/resources/setCookie.cgi?name=" + movie;
29     }
30
31     waitForEvent("canplay", function () {
32         if (window.layoutTestController)
33             window.layoutTestController.notifyDone();
34     } );
35 </script>
36 Tests that the media player will send the relevant cookies when requesting the media file.<br/>
37 </body>
38 </html>