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

Unified Diff: third_party/WebKit/LayoutTests/svg/dom/set-title-html-namespace-on-SVG.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-html-namespace-on-SVG.html
diff --git a/third_party/WebKit/LayoutTests/svg/dom/set-title-html-namespace-on-SVG.html b/third_party/WebKit/LayoutTests/svg/dom/set-title-html-namespace-on-SVG.html
new file mode 100644
index 0000000000000000000000000000000000000000..3e8bfbd74355b30950ddb1773936647792b05b31
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/dom/set-title-html-namespace-on-SVG.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+test(function() {
+ // svg != SVG
+ var doc = document.implementation.createDocument("http://www.w3.org/2000/svg", "SVG", null);
+ doc.documentElement.appendChild(doc.createElementNS("http://www.w3.org/1999/xhtml", "title"));
+ doc.documentElement.lastChild.textContent = "bar";
+ assert_equals(doc.title, "bar");
+
+ doc.documentElement.appendChild(doc.createElementNS("http://www.w3.org/1999/xhtml", "title"));
+ doc.documentElement.lastChild.textContent = "foo";
+ assert_equals(doc.title, "bar");
+}, "Test for setting title element in the html namespace on SVG element that is root.");
+</script>

Powered by Google App Engine
This is Rietveld 408576698