tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_html_template.xhtml (900B)


      1 <?xml version="1.0"?>
      2 <?xml-stylesheet type="text/css" href="chrome://global/skin"?>
      3 <?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
      4 <window title="HTML template in XUL"
      5        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
      6  <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
      7  <body xmlns="http://www.w3.org/1999/xhtml">
      8    <template id="template">Content<span>Content</span></template>
      9 <script type="application/javascript"><![CDATA[
     10  add_task(async function test_template() {
     11    let template = document.getElementById("template");
     12    ok("content" in template, "Template has shadow root.");
     13    is(template.childNodes.length, 0, "Template should have no children.");
     14    is(template.content.childNodes.length, 2, "Template content should have two children.");
     15  });
     16 ]]></script>
     17  </body>
     18 </window>