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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-play-pause-exception.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
OLDNEW
1 <html> 1 <!DOCTYPE html>
2 <body> 2 <title>Test that the playing event is not fired when video has no src.</title>
3 <video controls></video> 3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <video></video>
6 <script>
7 async_test(function(t) {
8 var video = document.querySelector("video");
4 9
5 <p>Video has no src. Test that the playing event is not dispatched.</p> 10 video.onplaying = t.unreached_func();
11 video.onloadstart = t.step_func(function() {});
12 video.ontimeupdate = t.step_func(function() {});
13 video.onwaiting = t.step_func(function() {});
6 14
7 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 15 video.onpause = t.step_func_done(function() {
8 (Please avoid writing new tests using video-test.js) --> 16 assert_equals(video.networkState, HTMLMediaElement.NETWORK_EMPTY);
9 <script src=video-test.js></script> 17 });
10 <script>
11 waitForEventAndFail('playing');
12 18
13 waitForEvent("loadstart"); 19 video.play();
14 waitForEvent("timeupdate"); 20 video.pause();
15 waitForEvent("waiting"); 21 });
16 22 </script>
17 function onpause()
18 {
19 testExpected("video.networkState", HTMLMediaElement.NETWORK_EMPTY);
20 endTest();
21 consoleWrite("");
22 }
23
24 waitForEvent("pause", onpause);
25
26 run("video.play()");
27 run("video.pause()");
28 </script>
29 </body>
30 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698