test_bug677495-1.html (944B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=677495 5 6 As mandated by the spec, the body of a media document must only contain one child. 7 --> 8 <head> 9 <title>Test for Bug 571981</title> 10 <script src="/tests/SimpleTest/SimpleTest.js"></script> 11 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 12 13 <script type="application/javascript"> 14 SimpleTest.waitForExplicitFinish(); 15 16 function frameLoaded() { 17 var testframe = document.getElementById('testframe'); 18 var testframeChildren = testframe.contentDocument.body.childNodes; 19 is(testframeChildren.length, 1, "Body of video document has 1 child"); 20 is(testframeChildren[0].nodeName, "VIDEO", "Only child of body must be a <video> element"); 21 22 SimpleTest.finish(); 23 } 24 </script> 25 26 </head> 27 <body> 28 <p id="display"></p> 29 30 <iframe id="testframe" name="testframe" onload="frameLoaded()" 31 src="file.webm"></iframe> 32 33 </body> 34 </html>