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

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

Issue 2092373002: Convert video-src* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/video-src-blob.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <!DOCTYPE html>
2 <head> 2 <title>Verify media element's "src" attribute on "loadstart" event.</title>
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></video>
7 <script> 7 <script>
8 async_test(function(t) {
9 var video = document.querySelector("video");
10 var mediaFile = findMediaFile("video", "content/test");
8 11
9 function test() 12 video.onloadstart = t.step_func_done(function () {
10 { 13 var url = video.currentSrc;
11 video = mediaElement = document.getElementsByTagName('video')[0] ; 14 assert_equals(url.substr(url.lastIndexOf("/media/")+7), mediaFile);
12 var mediaFile = findMediaFile("video", "content/test");
13 15
14 waitForEvent("loadstart", function () { 16 url = video.src;
15 testExpected("stripExtension(relativeURL(video.currentSrc))" , stripExtension(mediaFile)); 17 assert_equals(url.substr(url.lastIndexOf("/media/")+7), mediaFile);
16 testExpected("stripExtension(relativeURL(video.src))", strip Extension(mediaFile));
17 testExpected("stripExtension(video.getAttribute('src'))", st ripExtension(mediaFile));
18 endTest();
19 });
20 18
21 video.src = mediaFile; 19 assert_equals(video.getAttribute("src"), mediaFile);
22 } 20 });
23 </script>
24 </head>
25 21
26 <body onload="setTimeout(test, 100)"> 22 video.src = mediaFile;
27 <video controls></video> 23 });
28 </body> 24 </script>
29 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/video-src-blob.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698