test_bug677495-1.html 981 B

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