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

Side by Side 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: remove test expectation and use testharness.js 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>video is not paused while looping</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script src="w3c-media-utils.js"></script>
6 <video controls loop></video>
7 <p>Test that video should not be in a paused state while looping.</p>
8 <script>
9 async_test(function(test) {
10 var video = document.querySelector('video');
DaleCurtis 2014/09/18 19:44:47 Note two spaces is okay per the style guide, but u
qinmin 2014/09/18 20:40:40 Done.
11 video.src = 'content/test.mp4';
12
13 // Verify video is not paused.
14 function seeking()
15 {
16 assert_equals(video.currentTime, 0, 'currentTime');
17 assert_equals(video.paused, false, 'paused');
18 test.done();
19 }
20
21 // Play the video and wait for playback to loop.
22 function seeked()
23 {
24 waitForEventAndRunStep('seeking', video, seeking, test);
25 video.play();
26 }
27
28 // Seek to near the end.
29 video.onloadeddata = test.step_func(function() {
DaleCurtis 2014/09/18 19:44:47 Move this above setting .src or you have a race.
DaleCurtis 2014/09/18 19:44:47 Be consistent about {} placement. I prefer this st
qinmin 2014/09/18 20:40:40 Done.
qinmin 2014/09/18 20:40:40 Done.
30 waitForEventAndRunStep('seeked', video, seeked, test);
31 video.currentTime = video.duration - 0.4;
32 });
33 });
34 </script>
OLDNEW
« 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