Chromium Code Reviews| Index: LayoutTests/media/video-not-paused-while-looping.html |
| diff --git a/LayoutTests/media/video-not-paused-while-looping.html b/LayoutTests/media/video-not-paused-while-looping.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9067d1e8e77260b53c2acefd129e8006cd0f0d9d |
| --- /dev/null |
| +++ b/LayoutTests/media/video-not-paused-while-looping.html |
| @@ -0,0 +1,33 @@ |
| +<!DOCTYPE html> |
| +<title>video is not paused while looping</title> |
| +<script src="../resources/testharness.js"></script> |
| +<script src="../resources/testharnessreport.js"></script> |
| +<script src="w3c-media-utils.js"></script> |
| +<video controls loop></video> |
| +<p>Test that video should not be in a paused state while looping.</p> |
| +<script> |
| +async_test(function(test) { |
| + var video = document.querySelector('video'); |
| + |
| + // Seek to near the end. |
| + video.onloadeddata = test.step_func(function() { |
| + waitForEventAndRunStep('seeked', video, seeked, test); |
| + video.currentTime = video.duration - 0.4; |
| + }); |
| + |
| + video.src = 'content/test.mp4'; |
| + |
| + // Verify video is not paused. |
| + function seeking() { |
| + assert_equals(video.currentTime, 0, 'currentTime'); |
|
DaleCurtis
2014/09/19 01:02:36
Hmm, this seems like it could be fragile. I'd jus
qinmin
2014/09/19 17:35:20
Done.
|
| + assert_equals(video.paused, false, 'paused'); |
| + test.done(); |
| + } |
| + |
| + // Play the video and wait for playback to loop. |
| + function seeked() { |
| + waitForEventAndRunStep('seeking', video, seeking, test); |
| + video.play(); |
| + } |
| +}); |
| +</script> |