testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.title-08.html
author Bogdan Szekely <bszekely@mozilla.com>
Tue, 24 May 2022 12:30:06 +0300
changeset 618582 a8d14b4525477eee3cd5bd65a93751e2d1be60f4
parent 216659 f642698590301f923237de6d2479429096b61edd
permissions -rw-r--r--
Merge autoland to mozilla-central. a=merge

<!DOCTYPE html>
<link rel="author" title="Denis Ah-Kang" href="mailto:denis@w3.org">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#document.title">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
test(function() {
  assert_equals(document.title, "");
}, "No title element");

test(function() {
  var title = document.createElement("title");
  title.appendChild(document.createTextNode("PASS"));
  document.head.appendChild(title);
  assert_equals(document.title, "PASS");

  title.appendChild(document.createTextNode("PASS2"));
  title.appendChild(document.createTextNode("PASS3"));
  assert_equals(document.title, "PASSPASS2PASS3");
}, "title element contains multiple child text nodes");
</script>