Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(687)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/media/video-referer.html

Issue 2015503002: Move TODO(philipj) to TODO(foolip) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 </head> 3 </head>
4 <body onload="loadCookieAndReferer()"> 4 <body onload="loadCookieAndReferer()">
5 <video id="video"> 5 <video id="video">
6 <source id="source"> 6 <source id="source">
7 </video> 7 </video>
8 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 8 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956
9 (Please avoid writing new tests using video-test.js) --> 9 (Please avoid writing new tests using video-test.js) -->
10 <script src=../../media-resources/video-test.js></script> 10 <script src=../../media-resources/video-test.js></script>
11 <script src=../../media-resources/media-file.js></script> 11 <script src=../../media-resources/media-file.js></script>
12 <script> 12 <script>
13 function loadCookieAndReferer () { 13 function loadCookieAndReferer () {
14 var movie = findMediaFile('video', 'test'); 14 var movie = findMediaFile('video', 'test');
15 var type = mimeTypeForExtension(movie.split('.').pop()); 15 var type = mimeTypeForExtension(movie.split('.').pop());
16 var frame = document.createElement('iframe'); 16 var frame = document.createElement('iframe');
17 frame.width = 0; 17 frame.width = 0;
18 frame.height = 0; 18 frame.height = 0;
19 frame.addEventListener('load', function () { 19 frame.addEventListener('load', function () {
20 source = document.getElementById('source'); 20 source = document.getElementById('source');
21 source.src = 'http://127.0.0.1:8000/media/resources/video-refere r-check-referer.php?name=' + movie + '&type=' + type; 21 source.src = 'http://127.0.0.1:8000/media/resources/video-refere r-check-referer.php?name=' + movie + '&type=' + type;
22 source.type = type; 22 source.type = type;
23 23
24 waitForEventAndFail('error'); 24 waitForEventAndFail('error');
25 waitForEventAndEnd('canplay'); 25 waitForEventAndEnd('canplay');
26 video.load(); 26 video.load();
27 }); 27 });
28 28
29 frame.src = "data:text/html,<b>test</b>"; 29 frame.src = "data:text/html,<b>test</b>";
30 document.body.appendChild(frame); 30 document.body.appendChild(frame);
31 } 31 }
32 </script> 32 </script>
33 Tests that the media player will send the relevant referer when requesting the m edia file.<br/> 33 Tests that the media player will send the relevant referer when requesting the m edia file.<br/>
34 </body> 34 </body>
35 </html> 35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698