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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-load-preload-none.html

Issue 1715303002: Add TODOs to convert from video-test.js to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add bug ref Created 4 years, 10 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 <html>
2 <head> 2 <head>
3 <script src="media-file.js"></script> 3 <script src="media-file.js"></script>
4 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
5 (Please avoid writing new tests using video-test.js) -->
4 <script src="video-test.js"></script> 6 <script src="video-test.js"></script>
5 <script> 7 <script>
6 function start() 8 function start()
7 { 9 {
8 findMediaElement(); 10 findMediaElement();
9 video.src = findMediaFile("video", "content/test"); 11 video.src = findMediaFile("video", "content/test");
10 12
11 testExpected("video.preload", "none"); 13 testExpected("video.preload", "none");
12 testExpected("video.readyState", HTMLMediaElement.HAVE_NOTHING); 14 testExpected("video.readyState", HTMLMediaElement.HAVE_NOTHING);
13 waitForEventAndEnd('loadedmetadata'); 15 waitForEventAndEnd('loadedmetadata');
14 16
15 // Wait 250ms before load()ing to make sure setting src does not kick off the load 17 // Wait 250ms before load()ing to make sure setting src does not kick off the load
16 // (i.e. preload=none should still be respected). 18 // (i.e. preload=none should still be respected).
17 setTimeout(load, 250); 19 setTimeout(load, 250);
18 } 20 }
19 function load() 21 function load()
20 { 22 {
21 testExpected("video.readyState", HTMLMediaElement.HAVE_NOTHING); 23 testExpected("video.readyState", HTMLMediaElement.HAVE_NOTHING);
22 run("video.load()"); 24 run("video.load()");
23 } 25 }
24 </script> 26 </script>
25 </head> 27 </head>
26 28
27 <body> 29 <body>
28 <video preload="none"></video> 30 <video preload="none"></video>
29 <p>Test that an explicit load() to a media element whose preload is set to "none" still loads the video.</p> 31 <p>Test that an explicit load() to a media element whose preload is set to "none" still loads the video.</p>
30 <script>start();</script> 32 <script>start();</script>
31 </body> 33 </body>
32 </html> 34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698