4 <script src=../../media-resources/media-file.js
></script>
5 <script src=../../media-resources/video-test.js
></script>
9 if (window
.testRunner
) {
10 testRunner
.dumpAsText();
11 testRunner
.waitUntilDone();
14 function logEvent(event
)
16 consoleWrite("<br><b><em>'" + event
.type
+ "'<" + "/em> event<" + "/b>");
23 if (++loadCount
> 1) {
24 consoleWrite('FAIL: loadstart fired more than once.');
29 consoleWrite("*** Showing confirm dialog...");
30 confirm('I hope the movie continues to play!');
33 function canplaythrough()
44 consoleWrite("*** Setting up element...");
47 var movie
= findMediaFile("video", "../resources/test");
48 video
.src
= "http://127.0.0.1:8000/media/video-throttled-load.cgi?name=" + movie
+ "&throttle=100";
54 <body onload=
"setup()">
56 oncanplaythrough=
"canplaythrough()"
57 onloadstart=
"loadstart()">
59 <p>Make sure we don't reload a
<video
> element after a dialog is shown.
<br>
60 Test this by loading a movie slowly and showing a dialog when a 'loadstart' event
<br>
61 handler is called. If the movie is reloaded when the dialog is
"dismissed", another
<br>
62 'loadstart' event will be fired
</p>