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

Unified Diff: third_party/WebKit/LayoutTests/svg/dom/set-title-element-on-inner-svg-document.html

Issue 1774913003: (Re-commit) 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: Created 4 years, 9 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/set-title-element-on-inner-svg-document.html
diff --git a/third_party/WebKit/LayoutTests/svg/dom/set-title-element-on-inner-svg-document.html b/third_party/WebKit/LayoutTests/svg/dom/set-title-element-on-inner-svg-document.html
new file mode 100644
index 0000000000000000000000000000000000000000..e0ab577fa762fc06d201c063234cc7f474482dd5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/dom/set-title-element-on-inner-svg-document.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+test(function() {
+ var doc = document.implementation.createDocument("http://www.w3.org/2000/svg", "SVG", null);
+ var body = doc.createElementNS("http://www.w3.org/1999/xhtml", "body");
+ doc.documentElement.appendChild(body);
+ var svg = doc.createElementNS("http://www.w3.org/2000/svg", "svg");
+ body.appendChild(svg);
+ var g = doc.createElementNS("http://www.w3.org/2000/svg", "g");
+ svg.appendChild(g);
+ var title1 = doc.createElementNS("http://www.w3.org/1999/xhtml", "title");
+ title1.textContent = "title1";
+ g.appendChild(title1);
+ assert_equals(doc.title,'title1');
+ var title2 = doc.createElementNS("http://www.w3.org/1999/xhtml", "title");
+ title2.textContent = "title2";
+ svg.appendChild(title2);
+ assert_equals(doc.title,'title1');
+}, "Test for setting title element of inner svg document.");
+</script>

Powered by Google App Engine
This is Rietveld 408576698