no-children-rendered.tentative.html (1414B)
1 <!DOCTYPE html> 2 <meta charset=utf-8> 3 <link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md#locking-the-pepc-style"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <body> 7 <!-- The usermedia element is not a void element. Its children do not render. --> 8 9 <!-- This tests for implementations that used to have no end tag for the usermedia element 10 In those implementations there would be 2 usermedia elements in this div. --> 11 <div id="usermedia-element-div"> 12 <usermedia type="camera"> 13 <usermedia type="microphone"> 14 </div> 15 16 <usermedia id="mic" type="microphone">This is some text</usermedia> 17 18 <!-- The usermedia element does not automatically close <p> tags --> 19 <p id="paragraph">Foo <usermedia type="camera">bar</usermedia> baz</p> 20 21 <script> 22 test(function(){ 23 assert_equals(1, document.getElementById("usermedia-element-div").childElementCount); 24 assert_equals('', document.getElementById("mic").innerText); 25 assert_equals('This is some text', document.getElementById("mic").textContent); 26 assert_equals('This is some text', document.getElementById("mic").innerHTML); 27 assert_equals(4, document.body.childElementCount); //div, usermedia, script, p 28 assert_equals('Foo bar baz', document.getElementById("paragraph").textContent); 29 }, "The usermedia element should have no end tag or contents"); 30 </script> 31 </body>