3 Play to end with 'loop' set to true.
4 When 'seeked' event fires, verify that time has jumped back and movie is playing.
5 Set 'loop' to false and play again.
6 Verify that 'ended' event fires.
7 ++ Test setting/removing the attribute.
8 EXPECTED (video.getAttribute('loop') == 'null') OK
9 EXPECTED (video.loop == 'false') OK
10 RUN(video.loop = true)
11 EXPECTED (video.loop == 'true') OK
12 EXPECTED (video.getAttribute('loop') != 'null') OK
13 RUN(video.removeAttribute('loop'))
14 EXPECTED (video.loop == 'false') OK
16 ++ Set 'loop' to true and begin playing.
17 RUN(video.loop = true)
21 ++ seek to near the end, wait for 'seeked' event to announce loop.
22 EXPECTED (video.paused == 'false') OK
24 RUN(video.currentTime = video.duration - 0.4)
29 ++ first seek completed, beginning playback.
30 EXPECTED (video.paused == 'true') OK
31 EXPECTED (video.ended == 'false') OK
37 ++ second seek completed because video looped, toggle 'loop' and seek to near end again.
38 EXPECTED (video.paused == 'false') OK
39 EXPECTED (video.ended == 'false') OK
41 EXPECTED (mediaElement.currentTime >= '0') OK
42 EXPECTED (mediaElement.currentTime < 'mediaElement.duration') OK
43 RUN(video.loop = false)
44 RUN(video.currentTime = video.duration - 0.4)
49 ++ third seek completed, beginning playback for the last time.
50 EXPECTED (video.paused == 'true') OK
51 EXPECTED (video.ended == 'false') OK
58 ++ played to end and stopped.
59 EXPECTED (video.ended == 'true') OK
60 EXPECTED (mediaElement.currentTime == 'mediaElement.duration') OK