| OLD | NEW |
| (Empty) |
| 1 Test looping by: | |
| 2 | |
| 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 | |
| 15 | |
| 16 ++ Set 'loop' to true and begin playing. | |
| 17 RUN(video.loop = true) | |
| 18 | |
| 19 EVENT(play) | |
| 20 | |
| 21 ++ seek to near the end, wait for 'seeked' event to announce loop. | |
| 22 EXPECTED (video.paused == 'false') OK | |
| 23 RUN(video.pause()) | |
| 24 RUN(video.currentTime = video.duration - 0.4) | |
| 25 | |
| 26 EVENT(pause) | |
| 27 EVENT(seeked) | |
| 28 | |
| 29 ++ first seek completed, beginning playback. | |
| 30 EXPECTED (video.paused == 'true') OK | |
| 31 EXPECTED (video.ended == 'false') OK | |
| 32 RUN(video.play()) | |
| 33 | |
| 34 EVENT(play) | |
| 35 EVENT(seeked) | |
| 36 | |
| 37 ++ second seek completed because video looped, toggle 'loop' and seek to near en
d again. | |
| 38 EXPECTED (video.paused == 'false') OK | |
| 39 EXPECTED (video.ended == 'false') OK | |
| 40 RUN(video.pause()) | |
| 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) | |
| 45 | |
| 46 EVENT(pause) | |
| 47 EVENT(seeked) | |
| 48 | |
| 49 ++ third seek completed, beginning playback for the last time. | |
| 50 EXPECTED (video.paused == 'true') OK | |
| 51 EXPECTED (video.ended == 'false') OK | |
| 52 RUN(video.play()) | |
| 53 | |
| 54 EVENT(play) | |
| 55 EVENT(pause) | |
| 56 EVENT(ended) | |
| 57 | |
| 58 ++ played to end and stopped. | |
| 59 EXPECTED (video.ended == 'true') OK | |
| 60 EXPECTED (mediaElement.currentTime == 'mediaElement.duration') OK | |
| 61 | |
| 62 END OF TEST | |
| 63 | |
| OLD | NEW |