4 <body onload="loadCookieAndReferer()">
5 <video id="video"></video>
6 <script src=../../media-resources/video-test.js></script>
7 <script src=../../media-resources/media-file.js></script>
9 if (window.layoutTestController) {
10 layoutTestController.setAlwaysAcceptCookies(true);
13 function loadCookieAndReferer () {
14 var movie = findMediaFile('video', 'resources/test');
15 var frame = document.createElement('iframe');
18 frame.src = 'http://127.0.0.1:8000/media/resources/setCookieAndReferer.cgi?name=' + movie + '&referer=http://127.0.0.1:8000/media/resources';
20 frame.addEventListener('load', function () {
21 video = document.getElementById('video');
22 video.src='http://127.0.0.1:8000/media/resources/video-referer-check-referer.php';
26 document.body.appendChild(frame);
29 waitForEventAndEnd('error', function () {
30 consoleWrite('FAIL, got error when loading media error: ' + video.error.code);
33 waitForEvent('canplay', function () {
34 if (window.layoutTestController)
35 window.layoutTestController.notifyDone();
38 Tests that the media player will send the relevant referer when requesting the media file.<br/>