no-children-rendered.tentative.html (1377B)
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 geolocation 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 geolocation element 10 In those implementations there would be 2 geolocation elements in this div. --> 11 <div id="geolocation-element-div"> 12 <geolocation> 13 <geolocation> 14 </div> 15 16 <geolocation id="el1">This is some text</geolocation> 17 18 <!-- The geolocation element does not automatically close <p> tags --> 19 <p id="paragraph">Foo <geolocation>bar</geolocation> baz</p> 20 21 <script> 22 test(function(){ 23 assert_equals(1, document.getElementById("geolocation-element-div").childElementCount); 24 assert_equals('', document.getElementById("el1").innerText); 25 assert_equals('This is some text', document.getElementById("el1").textContent); 26 assert_equals('This is some text', document.getElementById("el1").innerHTML); 27 assert_equals(4, document.body.childElementCount); //div, geolocation, script, p 28 assert_equals('Foo bar baz', document.getElementById("paragraph").textContent); 29 }, "The geolocation element should have no end tag or contents"); 30 </script> 31 </body>