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

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

Issue 1715303002: Add TODOs to convert from video-test.js to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add bug ref Created 4 years, 10 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 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
4 (Please avoid writing new tests using video-test.js) -->
3 <script src=../../media-resources/video-test.js></script> 5 <script src=../../media-resources/video-test.js></script>
4 <script src=../../media-resources/media-file.js></script> 6 <script src=../../media-resources/media-file.js></script>
5 <script> 7 <script>
6 function loadMediaFrame() 8 function loadMediaFrame()
7 { 9 {
8 findMediaElement(); 10 findMediaElement();
9 11
10 var movie = findMediaFile('video', 'test'); 12 var movie = findMediaFile('video', 'test');
11 var type = mimeTypeForExtension(movie.split('.').pop()); 13 var type = mimeTypeForExtension(movie.split('.').pop());
12 var frame = document.createElement('iframe'); 14 var frame = document.createElement('iframe');
13 frame.width = 0; 15 frame.width = 0;
14 frame.height = 0; 16 frame.height = 0;
15 frame.addEventListener('load', function () { 17 frame.addEventListener('load', function () {
16 source = document.getElementById('source'); 18 source = document.getElementById('source');
17 source.src = 'http://127.0.0.1:8000/media/resources/vide o-check-useragent.php?name=' + movie + '&type=' + type; 19 source.src = 'http://127.0.0.1:8000/media/resources/vide o-check-useragent.php?name=' + movie + '&type=' + type;
18 source.type = type; 20 source.type = type;
19 21
20 waitForEventAndFail('error'); 22 waitForEventAndFail('error');
21 waitForEventAndEnd('canplay'); 23 waitForEventAndEnd('canplay');
22 video.load(); 24 video.load();
23 }); 25 });
24 26
25 frame.src = "data:text/html,<b>test</b>"; 27 frame.src = "data:text/html,<b>test</b>";
26 document.body.appendChild(frame); 28 document.body.appendChild(frame);
27 } 29 }
28 </script> 30 </script>
29 </head> 31 </head>
30 32
31 <body onload="loadMediaFrame()"> 33 <body onload="loadMediaFrame()">
32 <video id="video"> 34 <video id="video">
33 <source id="source"> 35 <source id="source">
34 </video> 36 </video>
35 <br> 37 <br>
36 Tests that the media player sends the WebKit User Agent string when requ esting a media file. 38 Tests that the media player sends the WebKit User Agent string when requ esting a media file.
37 </body> 39 </body>
38 </html> 40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698