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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-play-empty-events.html

Issue 2090593002: Convert video-play* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/video-play-empty-events-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 <body> 2 <title>Test that play() from EMPTY network state triggers load() and async playi ng event.</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script src="media-file.js"></script>
6 <video></video>
7 <script>
8 async_test(function(t) {
9 var video = document.querySelector("video");
10 assert_equals(video.networkState, HTMLMediaElement.NETWORK_EMPTY);
3 11
4 <video controls></video> 12 video.onloadstart = t.step_func(function() {});
5 <p>Test that play() from EMPTY network state triggers load() and async play event.</p> 13 video.onratechange = t.step_func(function() {});
6 <script src=media-file.js></script> 14 video.onwaiting = t.step_func(function() {});
7 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 15 video.ondurationchange = t.step_func(function() {});
8 (Please avoid writing new tests using video-test.js) --> 16 video.onloadedmetadata = t.step_func(function() {});
9 <script src=video-test.js></script> 17 video.onloadeddata = t.step_func(function() {});
10 <script> 18 video.oncanplay = t.step_func(function() {});
11 testExpected("video.networkState", HTMLMediaElement.NETWORK_EMPTY); 19 video.onplay = t.step_func(function() {});
12 20
13 waitForEvent("loadstart"); 21 video.onplaying = t.step_func_done(function () {
14 waitForEvent("ratechange"); 22 assert_false(video.paused);
15 waitForEvent("waiting"); 23 });
16 waitForEvent("ratechange");
17 waitForEvent("durationchange");
18 waitForEvent("loadedmetadata");
19 waitForEvent("loadeddata");
20 waitForEvent("canplay");
21 waitForEvent("play");
22 24
23 waitForEvent('playing', function () { testExpected("video.paused", false ); endTest(); } ); 25 video.src = findMediaFile("video", "content/test");
24 26 video.play();
25 video.src = findMediaFile("video", "content/test"); 27 });
26 run("video.play()"); 28 </script>
27 consoleWrite("SCRIPT DONE");
28 </script>
29
30 </body>
31 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/video-play-empty-events-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698