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

Unified Diff: third_party/WebKit/LayoutTests/svg/dom/svg-document-test.html

Issue 1752713002: Fix SVGDocument return title that is not a child of the root element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test Created 4 years, 10 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
Index: third_party/WebKit/LayoutTests/svg/dom/svg-document-test.html
diff --git a/third_party/WebKit/LayoutTests/svg/dom/svg-document-test.html b/third_party/WebKit/LayoutTests/svg/dom/svg-document-test.html
new file mode 100644
index 0000000000000000000000000000000000000000..585e8be94934110d8523d0d9930b83efa80d4e0b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/dom/svg-document-test.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+description("Tests that get and set document.title.");
fs 2016/03/01 15:49:03 Not sure if this test tests anything that the web-
hyunjunekim2 2016/03/03 14:06:10 Done.removed this test, and added mutation test fo
+
+var svgDoc = document.implementation.createDocument("http://www.w3.org/2000/svg", "svg", null);
+var g = svgDoc.createElementNS("http://www.w3.org/2000/svg", "g");
+var title = svgDoc.createElementNS("http://www.w3.org/2000/svg", "title");
+title.textContent = "foo";
+g.appendChild(title);
+svgDoc.documentElement.appendChild(g);
+shouldBeEqualToString("svgDoc.title", "");
+
+svgDoc.title = "foo";
+shouldBeEqualToString("svgDoc.title", "foo");
+shouldBe("svgDoc.documentElement.childNodes.length","2");
+svgDoc.title = "bar";
+shouldBeEqualToString("svgDoc.title", "bar");
+shouldBe("svgDoc.documentElement.childNodes.length","2");
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698