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(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> |
OLD | NEW |