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

Side by Side Diff: third_party/WebKit/LayoutTests/media/media-can-load-when-hidden.html

Issue 2028463002: Convert media-can-* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 6 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/media-can-load-when-hidden-expected.txt » ('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>Test HTMLMediaElement to be sure that the video is getting loaded even if the element is hidden.</title>
3 <style> 3 <style>
4 video {display:none; background-color: yellow; width: 320px; height: 240px;} 4 video { display: none; }
5 </style> 5 </style>
6 </head> 6 <video></video>
7 <body onload="start()"> 7 <script src="media-file.js"></script>
8 8 <script src="../resources/testharness.js"></script>
9 <video controls ></video> 9 <script src="../resources/testharnessreport.js"></script>
10 10 <script>
11 <p>Test HTMLMediaElement to be sure that the video is getting loaded eve n if the element 11 async_test(function(t) {
12 is hidden.</p> 12 var video = document.querySelector("video");
13 <script src=media-file.js></script> 13 video.ondurationchange = t.step_func_done();
14 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 14 video.src = findMediaFile("video", "content/test");
15 (Please avoid writing new tests using video-test.js) --> 15 });
16 <script src=video-test.js></script> 16 </script>
17 <script>
18 function start()
19 {
20 video = document.getElementsByTagName('video')[0];
21 waitForEvent('durationchange', function() { endTest(); });
22 video.src = findMediaFile("video", "content/test");
23 }
24 </script>
25 </body>
26 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/media-can-load-when-hidden-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698