Bug 1507999 [wpt PR 14101] - Setting document.title should have no effect for non SVG/HTML documents, a=testonly
authorRob Buis <rbuis@igalia.com>
Thu, 22 Nov 2018 10:34:24 +0000
changeset 504348 39b43922cd8e6cf159f4d09f869508eab41fe614
parent 504347 87c44417b95ebaa4a03ce72950edc62f695b8f46
child 504349 5c99519fee0949fb0d26fd9d6b036143e672d0ac
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1507999, 14101, 906038, 1339959, 609407
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1507999 [wpt PR 14101] - Setting document.title should have no effect for non SVG/HTML documents, a=testonly Automatic update from web-platform-testsSetting document.title should have no effect for non SVG/HTML documents Setting document.title should have no effect for non SVG/HTML documents, see https://html.spec.whatwg.org/multipage/dom.html#document.title. Behavior matches Firefox. Bug: 906038 Change-Id: I724abf9ecd711536d71ad95ab45c72230c2e87b6 Reviewed-on: https://chromium-review.googlesource.com/c/1339959 Commit-Queue: Rob Buis <rbuis@igalia.com> Reviewed-by: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#609407} -- wpt-commits: f02babe0650c3a6ee81d8c7542765af1b4761809 wpt-pr: 14101
testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.title-not-in-html-svg.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.title-not-in-html-svg.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com">
+<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>
+
+function newXMLDocument() {
+  return document.implementation.createDocument(null, "foo", null);
+}
+
+test(function() {
+  var doc = newXMLDocument();
+  assert_equals(doc.title, "");
+  doc.title = "fail";
+  assert_equals(doc.title, "");
+}, "Should not be able to set document title in XML document");
+
+test(function() {
+  var doc = newXMLDocument();
+  doc.documentElement.appendChild(document.createElementNS("http://www.w3.org/1999/xhtml", "html:title"));
+  assert_equals(doc.title, "");
+  doc.title = "fail";
+  assert_equals(doc.title, "");
+}, "Should not be able to set document title in XML document with html:title element");
+</script>