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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-source-type.html

Issue 2102433003: Convert video-source* 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <title>Test "source" element "type" attribute.</title>
3 <head> 3 <script src="../resources/testharness.js"></script>
4 <title> &lt;source&gt; @type attribute</title> 4 <script src="../resources/testharnessreport.js"></script>
5 <script src="media-file.js"></script>
6 <video>
7 <source src=content/error.mpeg type=video/blahblah>
8 <source src=test.mp4 type=video/x-chicken-face>
9 <source src=test.ogv type=audio/x-higglety-pigglety>
10 <source src=content/test.mp4 type=video/mp4>
11 <source src=content/test.ogv type=video/ogg>
12 <source src=content/error2.mpeg type=video/mpeg>
13 </video>
14 <script>
15 async_test(function(t) {
16 var video = document.querySelector("video");
5 17
6 <script src=media-file.js></script> 18 video.onloadstart = t.step_func_done(function() {
7 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 19 var url = video.currentSrc;
8 (Please avoid writing new tests using video-test.js) --> 20 assert_equals(url.substr(url.lastIndexOf("/media/") + 7), findMediaFile( "video", "content/test"));
9 <script src=video-test.js></script> 21 });
10 <script> 22 });
11 waitForEvent("loadstart", function () { 23 </script>
12 video = mediaElement = document.getElementsByTagName('video')[0];
13 testExpected("stripExtension(relativeURL(video.currentSrc))", stripE xtension(findMediaFile("video", "content/test")));
14 endTest();
15 });
16 </script>
17 </head>
18 <body>
19 <video controls>
20 <source src=content/error.mpeg type=video/blahblah>
21 <source src=test.mp4 type=video/x-chicken-face>
22 <source src=test.ogv type=audio/x-higglety-pigglety>
23 <source src=content/test.mp4 type=video/mp4>
24 <source src=content/test.ogv type=video/ogg>
25 <source src=content/error2.mpeg type=video/mpeg>
26 </video>
27 </body>
28 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698