4 <script src=video-test.js
></script>
7 <p>Verify there is a 'durationchange' event just before 'ended' event if the initially reported duration exceeds the actual data.
</p>
9 var initialReportedDuration
= -1;
11 video
= document
.createElement('video');
12 document
.body
.appendChild(video
);
13 video
.src
= "content/truncated.webm";
15 waitForEvent('durationchange', function() {
16 // Note the initial reported duration
17 if (initialReportedDuration
== -1)
18 initialReportedDuration
= video
.duration
;
21 waitForEventAndEnd('ended', function() {
22 // Verify that the actual duration is less than
23 // the initial reported duration
24 testExpected("video.duration < initialReportedDuration", true);