4 <title>Wave Media test:
8-bit sample format
</title>
5 <script type=
"text/javascript" src=
"/MochiKit/MochiKit.js"></script>
6 <script type=
"text/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
7 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
11 onloadedmetadata='return startTest();'
12 onended='return playbackEnded();'
>
13 <source type='audio/x-wav' src='r11025_u8_c1.wav'
>
16 <script class=
"testbody" type=
"text/javascript">
17 // Test if the ended event works correctly.
18 var v = document.getElementById('v');
19 var endPassed = false;
20 var completed = false;
22 function startTest() {
30 function playbackEnded() {
35 ok(v.currentTime
>=
0.9 && v.currentTime <=
1.1,
36 "Checking currentTime at end: " + v.currentTime);
37 ok(v.ended,
"Checking playback has ended");
42 SimpleTest.waitForExplicitFinish();