Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: LayoutTests/fast/dom/document-set-title-no-head.html

Issue 98373012: Don't set document.title when there is no <head> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/dom/document-set-title-no-head.html
diff --git a/LayoutTests/fast/dom/document-set-title-no-head.html b/LayoutTests/fast/dom/document-set-title-no-head.html
new file mode 100644
index 0000000000000000000000000000000000000000..87e9c1ee32f98b51c0263fdb6cd4c565694b05fb
--- /dev/null
+++ b/LayoutTests/fast/dom/document-set-title-no-head.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<head></head>
+<body>
+<script src="../../resources/js-test.js"></script>
+<script type="text/javascript">
+description("Test that setting document.title when there is no &lt;head&gt; or &lt;title&gt; does nothing");
+onload = function()
+{
+ var head = document.head;
+ while (head.firstChild)
+ document.documentElement.appendChild(head.firstChild);
+ document.documentElement.removeChild(head);
+ document.title = "New title";
+ shouldBeEmptyString('document.title');
+}
+</script>
+</body>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/document-set-title-no-head-expected.txt » ('j') | Source/core/dom/Document.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698