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

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

Issue 2167743002: Convert media-document* and pdf* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 a media document can open a media URL with an ambiguous extens ion.</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 <script>
8 var frame; 8 async_test(function(t) {
9 function loadMediaFrame() 9 var movie = findMediaFile('video', 'test');
10 { 10 var type = mimeTypeForExtension(movie.split('.').pop());
11 var movie = findMediaFile('video', 'test'); 11 var iframe = document.createElement('iframe');
12 var type = mimeTypeForExtension(movie.split('.').pop());
13 frame = document.createElement('iframe');
14 frame.addEventListener('load', function () {
15 testExpected("frame.contentDocument.getElementsByTagName('vi deo')[0].error", null);
16 endTest();
17 });
18 waitForEventAndFail('error');
Srirama 2016/07/20 14:46:56 these events are added to "document" and they are
19 waitForEventAndEnd('canplay');
20 frame.src = 'resources/video-check-useragent.php?name=' + movie + '&type=' + type;
21 document.body.appendChild(frame);
22 }
23 </script>
24 </head>
25 12
26 <body onload="loadMediaFrame()"> 13 iframe.onload = t.step_func_done(function() {
27 <br> 14 assert_equals(iframe.contentDocument.querySelector('video').error, null) ;
28 Tests that a media document can open a media URL with an ambiguous exten sion. 15 });
29 <br> 16
30 </body> 17 iframe.src = 'resources/video-check-useragent.php?name=' + movie + '&type=' + type;
31 </html> 18 document.body.appendChild(iframe);
19 });
20 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698