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

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

Issue 2098213002: Convert video-src-[plus-source, remove, set, source].html tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address nits 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 <body> 1 <!DOCTYPE html>
2 <video><source></source></video> 2 <title>Test that a "source" element is not used when "src" attribute is set.</ti tle>
3 <script src=media-file.js></script> 3 <script src="../resources/testharness.js"></script>
4 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 4 <script src="../resources/testharnessreport.js"></script>
5 (Please avoid writing new tests using video-test.js) --> 5 <script src="media-file.js"></script>
6 <script src=video-test.js></script> 6 <video>
7 <source></source>
8 </video>
7 <script> 9 <script>
10 async_test(function(t) {
11 var video = document.querySelector("video");
8 var mediaFile = findMediaFile("video", "content/test"); 12 var mediaFile = findMediaFile("video", "content/test");
9 waitForEvent('loadstart', function () { 13
10 testExpected("stripExtension(relativeURL(video.currentSrc))", stripExten sion(mediaFile)); 14 video.onloadstart = t.step_func_done(function() {
11 endTest(); 15 var url = video.currentSrc;
12 } ); 16 assert_equals(url.substr(url.lastIndexOf("/media/")+7), mediaFile);
13 document.getElementsByTagName('source')[0].src = "content/error.mpeg"; 17 });
14 mediaElement.src = mediaFile; 18
15 </script> 19 document.querySelector("source").src = "content/error.mpeg";
20 video.src = mediaFile;
21 });
22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698