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

Unified Diff: LayoutTests/media/video-not-paused-while-looping.html

Issue 585563003: Layout test to test that video should not be in a paused state while looping (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressing comments Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698