tor-browser

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

document.title-not-in-html-svg.html (938B)


      1 <!DOCTYPE html>
      2 <link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com">
      3 <link rel="help" href="https://html.spec.whatwg.org/multipage/#document.title">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <div id="log"></div>
      7 <script>
      8 
      9 function newXMLDocument() {
     10  return document.implementation.createDocument(null, "foo", null);
     11 }
     12 
     13 test(function() {
     14  var doc = newXMLDocument();
     15  assert_equals(doc.title, "");
     16  doc.title = "fail";
     17  assert_equals(doc.title, "");
     18 }, "Should not be able to set document title in XML document");
     19 
     20 test(function() {
     21  var doc = newXMLDocument();
     22  doc.documentElement.appendChild(document.createElementNS("http://www.w3.org/1999/xhtml", "html:title"));
     23  assert_equals(doc.title, "");
     24  doc.title = "fail";
     25  assert_equals(doc.title, "");
     26 }, "Should not be able to set document title in XML document with html:title element");
     27 </script>