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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-no-timeupdate-before-playback.html

Issue 2088143003: Convert video-muted* and video-no* tests to testharness.js. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address nits 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <title>Test that no timeupdate event fires during loading.</title>
3 <body> 3 <script src="../resources/testharness.js"></script>
4 <p>Test that no timeupdate event fires during loading.</p> 4 <script src="../resources/testharnessreport.js"></script>
5 <video></video> 5 <script src="media-file.js"></script>
6 <script src="media-file.js"></script> 6 <video></video>
7 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 7 <script>
8 (Please avoid writing new tests using video-test.js) --> 8 async_test(function(t) {
9 <script src="video-test.js"></script> 9 var video = document.querySelector("video");
10 <script> 10 video.onloadstart = t.step_func(function() {});
11 waitForEvent("loadstart"); 11 video.onloadedmetadata = t.step_func(function() {});
12 waitForEvent("loadedmetadata"); 12 video.onloadeddata = t.step_func(function() {});
13 waitForEvent("loadeddata"); 13 video.oncanplay = t.step_func(function() {});
14 waitForEvent("canplay");
15 waitForEvent("canplaythrough", function()
16 {
17 // Let pending async events fire before ending the test.
18 window.setTimeout(function() { endTest(); }, 0);
19 });
20 waitForEventAndFail("timeupdate");
21 14
22 video.src = findMediaFile("video", "content/test"); 15 video.oncanplaythrough = t.step_func(function() {
23 </script> 16 // Let pending async events fire before ending the test.
24 </body> 17 setTimeout(t.step_func_done(), 0);
25 </html> 18 });
19
20 video.ontimeupdate = t.unreached_func();
21 video.src = findMediaFile("video", "content/test");
22 });
23 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698