Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / media / video-cookie.html
blob7bff06507cf08ffb1d91747aa9ac7d7fe2fa3597
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.testRunner) {
10 testRunner.dumpAsText();
11 testRunner.setAlwaysAcceptCookies(true);
12 testRunner.waitUntilDone();
15 function loadCookie () {
16 var movie = findMediaFile("video", "resources/test");
17 var frame = document.createElement("iframe");
18 document.body.appendChild(frame);
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 });
26 frame.width = 0;
27 frame.height = 0;
28 frame.src = "http://127.0.0.1:8000/media/resources/setCookie.cgi?name=" + movie;
31 waitForEvent("canplay", function () {
32 if (window.testRunner)
33 window.testRunner.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>