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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-no-autoplay.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, 5 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 <video controls></video> 1 <!DOCTYPE html>
2 <p>Test that play event does not fire when "src" set with no autoplay attribute. </p> 2 <title>Test that play event does not fire when "src" set with no autoplay attrib ute.</title>
3 <script src=media-file.js></script> 3 <script src="../resources/testharness.js"></script>
4 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 4 <script src="../resources/testharnessreport.js"></script>
5 (Please avoid writing new tests using video-test.js) --> 5 <script src="media-file.js"></script>
6 <script src=video-test.js></script> 6 <video></video>
7 <script> 7 <script>
8 testExpected("video.paused", true); 8 async_test(function(t) {
9 var video = document.querySelector("video");
10 assert_true(video.paused);
9 11
10 waitForEvent('play', function () { 12 video.onplay = t.unreached_func();
11 logResult(false, "PLAY fired");
12 endTest();
13 } );
14 13
15 function testPaused () 14 video.oncanplaythrough = t.step_func(function() {
16 { 15 setTimeout(t.step_func_done(function() {
17 testExpected("video.paused", true); 16 assert_true(video.paused);
18 endTest(); 17 }), 500);
19 } 18 });
20 waitForEvent('canplaythrough', function () { setTimeout(testPaused, 500);} ) ;
21 19
22 video.src = findMediaFile("video", "content/test"); 20 video.src = findMediaFile("video", "content/test");
23 </script> 21 });
22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698