content/html/document/test/test_bug677495-1.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/html/document/test/test_bug677495-1.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,34 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=677495
     1.8 +
     1.9 +As mandated by the spec, the body of a media document must only contain one child.
    1.10 +-->
    1.11 +<head>
    1.12 +  <title>Test for Bug 571981</title>
    1.13 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.14 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.15 +
    1.16 +<script type="application/javascript">
    1.17 +  SimpleTest.waitForExplicitFinish();
    1.18 +
    1.19 +  function frameLoaded() {
    1.20 +    var testframe = document.getElementById('testframe');
    1.21 +    var testframeChildren = testframe.contentDocument.body.childNodes;
    1.22 +    is(testframeChildren.length, 1, "Body of video document has 1 child");
    1.23 +    is(testframeChildren[0].nodeName, "VIDEO", "Only child of body must be a <video> element");
    1.24 +
    1.25 +    SimpleTest.finish();
    1.26 +  }
    1.27 +</script>
    1.28 +
    1.29 +</head>
    1.30 +<body>
    1.31 +  <p id="display"></p>
    1.32 +
    1.33 +  <iframe id="testframe" name="testframe" onload="frameLoaded()"
    1.34 +   src="data:video/webm,"></iframe>
    1.35 +
    1.36 +</body>
    1.37 +</html>

mercurial