tor-browser

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

document.title-06.html (807B)


      1 <!doctype html>
      2 <title>document.title and the empty string</title>
      3 <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
      4 <link rel="help" href="https://html.spec.whatwg.org/multipage/#document.title">
      5 <meta name="assert" content="On setting document.title to the empty string, no text node must be created.">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <div id="log"></div>
      9 <script>
     10 test(function() {
     11  var head = document.documentElement.firstChild;
     12  head.removeChild(head.firstChild);
     13  assert_equals(document.title, "");
     14  document.title = "";
     15  assert_equals(document.title, "");
     16  assert_true(head.lastChild instanceof HTMLTitleElement, "Need a title element.");
     17  assert_equals(head.lastChild.firstChild, null);
     18 });
     19 </script>