Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / media / remove-from-document.html
blobd95f6aa30500472abab69a02712895495bdad315
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src=media-file.js></script>
5 <script src=video-test.js></script>
6 <script type="text/javascript" charset="utf-8">
7 function doSetup()
9 video = document.getElementsByTagName('video')[0];
10 video.src = findMediaFile("video", "content/test");
13 function doTest ()
15 consoleWrite("EVENT(canplaythrough)");
16 testExpected("video.networkState", HTMLMediaElement.NETWORK_EMPTY, "!=");
17 testExpected("video.paused", false);
19 run("document.body.removeChild(video)");
21 testExpected("video.networkState", HTMLMediaElement.NETWORK_EMPTY, "!=");
22 testExpected("video.paused", true);
24 document.body.offsetTop;
25 endTest();
28 window.addEventListener('load', doSetup, false);
29 </script>
30 </head>
31 <body>
32 <p>Test that removing a media element from the tree pauses playback but does not unload the media.</p>
33 <video controls autoplay oncanplaythrough="doTest()"></video>
34 </body>
35 </html>