OLD | NEW |
---|---|
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(function() { |
fs
2016/06/22 10:47:18
Nit: Use step_func_done?
Srirama
2016/06/22 11:15:58
Done.
| |
17 testExpected("video.paused", true); | 16 assert_true(video.paused); |
18 endTest(); | 17 t.done(); |
19 } | 18 }, 500); |
20 waitForEvent('canplaythrough', function () { setTimeout(testPaused, 500);} ) ; | 19 }); |
21 | 20 |
22 video.src = findMediaFile("video", "content/test"); | 21 video.src = findMediaFile("video", "content/test"); |
23 </script> | 22 }); |
23 </script> | |
OLD | NEW |