2 <p>Test that removing a media element from the tree while loading does not crash.
</p>
3 <script src=../../media-resources/media-file.js
></script>
4 <script src=../../media-resources/video-test.js
></script>
6 waitForEvent('loadedmetadata', function () {
7 run("document.body.removeChild(video)");
11 // Find a supported media file.
12 var mediaFile
= findMediaFile("video", "content/test");
13 var mimeType
= mimeTypeForFile(mediaFile
);
15 video
.src
= "http://127.0.0.1:8000/resources/load-and-stall.cgi?name=../../../media/" + mediaFile
+ "&mimeType=" + mimeType
+ "&stallAt=100000";