Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / media / reload-after-dialog.html
blob948ab9343a0f37360945cbdf9c2a07418383a541
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src=../../media-resources/media-file.js></script>
5 <script src=../../media-resources/video-test.js></script>
6 <script>
7 var loadCount = 0;
9 if (window.testRunner) {
10 testRunner.dumpAsText();
11 testRunner.waitUntilDone();
14 function logEvent(event)
16 consoleWrite("<br><b><em>'" + event.type + "'<" + "/em> event<" + "/b>");
19 function loadstart()
21 logEvent(event);
23 if (++loadCount > 1) {
24 consoleWrite('FAIL: loadstart fired more than once.');
25 endTest();
26 return;
29 consoleWrite("*** Showing confirm dialog...");
30 confirm('I hope the movie continues to play!');
33 function canplaythrough()
35 logEvent(event);
37 consoleWrite("");
38 endTest();
41 function setup()
43 logEvent(event);
44 consoleWrite("*** Setting up element...");
46 findMediaElement();
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";
51 </script>
52 </head>
54 <body onload="setup()">
55 <video controls
56 oncanplaythrough="canplaythrough()"
57 onloadstart="loadstart()">
58 </video>
59 <p>Make sure we don't reload a &lt;video&gt; 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>
63 </body>
64 </html>