4 https://bugzilla.mozilla.org/show_bug.cgi?id=467972
7 <title>Test for Bug
467972</title>
8 <script type=
"application/javascript" src=
"/MochiKit/MochiKit.js"></script>
9 <script type=
"application/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=467972">Mozilla Bug
467972</a>
17 onloadedmetadata=
"return loadedMetaData();"
18 onended=
"playbackEnded();"
19 onloadeddata=
"return loadedData();"
20 onseeking=
"seekStarted();"
21 onseeked=
"seekEnded();"
25 <div id=
"content" style=
"display: none">
29 <script type=
"application/javascript">
31 /** Test for Bug
467972 **/
35 var gSeekStarted = false;
36 var gSeekEnded = false;
37 var gLoadedDataCount =
0;
38 var gLoadedMetaDataCount =
0;
41 return document.getElementById(id);
48 function seekStarted() {
52 function seekEnded() {
57 function loadedData() {
59 ok(gLoadedDataCount <=
1,
"No more than 1 onloaddata events");
62 function loadedMetaData() {
63 gLoadedMetaDataCount++;
64 ok(gLoadedMetaDataCount <=
1,
"No more than 1 onloadedmetadata events");
69 function playbackEnded() {
71 video().currentTime =
0;
74 ok(gSeekEnded,
"Should have received seekended");
75 ok(gSeekStarted,
"Should have received seekstarted");
76 is(gLoadedDataCount,
1,
"Should have 1 onloadeddata event");
77 is(gLoadedMetaDataCount,
1,
"Should have 1 onloadedmetadata event");
83 SimpleTest.waitForExplicitFinish();