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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/media/video-load-with-userpass.html

Issue 2180713002: Convert video-load* http tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test failures Created 4 years, 4 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 <!DOCTYPE html>
2 <head> 2 <title>Tests that the media player does not include authorization information.</ title>
3 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 3 <script src="../resources/testharness.js"></script>
4 (Please avoid writing new tests using video-test.js) --> 4 <script src="../resources/testharnessreport.js"></script>
5 <script src=../../media-resources/video-test.js></script> 5 <script src="../../media-resources/media-file.js"></script>
6 <script src=../../media-resources/media-file.js></script> 6 <body>
7 <script> 7 <video>
8 function loadMediaFrame() 8 <source></source>
9 { 9 </video>
10 findMediaElement(); 10 <script>
11 async_test(function(t) {
12 var frame = document.createElement('iframe');
13 frame.onload = t.step_func(function() {
14 var video = document.querySelector('video');
15 video.onerror = t.unreached_func();
16 video.oncanplay = t.step_func_done();
11 17
12 var movie = findMediaFile('video', 'test'); 18 var movie = findMediaFile('video', 'test');
13 var type = mimeTypeForExtension(movie.split('.').pop()); 19 var type = mimeTypeForExtension(movie.split('.').pop());
14 var frame = document.createElement('iframe'); 20 source = document.querySelector('source');
15 frame.width = 0; 21 source.type = type;
16 frame.height = 0; 22 source.src = 'http://user:pass@127.0.0.1:8080/media/resources/video-chec k-userpass.php?name=' + movie + '&type=' + type;
17 frame.addEventListener('load', function () { 23 video.load();
18 source = document.getElementById('source'); 24 });
19 source.src = 'http://user:pass@127.0.0.1:8080/media/reso urces/video-check-userpass.php?name=' + movie + '&type=' + type;
20 source.type = type;
21 25
22 waitForEventAndFail('error'); 26 frame.src = 'data:text/html,<b>test</b>';
23 waitForEventAndEnd('canplay'); 27 document.body.appendChild(frame);
24 video.load(); 28 });
25 }); 29 </script>
26
27 frame.src = "data:text/html,<b>test</b>";
28 document.body.appendChild(frame);
29 }
30 </script>
31 </head>
32
33 <body onload="loadMediaFrame()">
34 <video id="video">
35 <source id="source">
36 </video>
37 <br>
38 Tests that the media player does not include authorization information.
39 </body>
40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698