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

Unified Diff: LayoutTests/fast/dom/document-set-title-no-child-on-empty.html

Issue 143363002: Don't create an empty text node when setting document.title to the empty string (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix indentation in test Created 6 years, 11 months 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/document-set-title-no-child-on-empty-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/document-set-title-no-child-on-empty.html
diff --git a/LayoutTests/fast/dom/document-set-title-no-child-on-empty.html b/LayoutTests/fast/dom/document-set-title-no-child-on-empty.html
new file mode 100644
index 0000000000000000000000000000000000000000..80bd7a975233e9ca026ec7e57d9d0e74d56d69f6
--- /dev/null
+++ b/LayoutTests/fast/dom/document-set-title-no-child-on-empty.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<title>document title and the empty string</title>
+<script src="../../resources/js-test.js"></script>
+<body>
+<script>
+ description("On setting document.title to the empty string, no text node must be created");
+
+ var head = document.documentElement.firstChild;
+ head.removeChild(head.firstChild);
+ shouldBeEqualToString("document.title", "");
+ document.title = "";
+ shouldBeEqualToString("document.title", "");
+ shouldBeTrue("head.lastChild instanceof HTMLTitleElement");
+ shouldBe("head.lastChild.firstChild", 'null');
+</script>
+</body>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/document-set-title-no-child-on-empty-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698