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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <script>
5 test(function() {
6 var doc = document.implementation.createDocument("http://www.w3.org/2000/svg", "SVG", null);
7 var body = doc.createElementNS("http://www.w3.org/1999/xhtml", "body");
8 doc.documentElement.appendChild(body);
9 var svgDoc = doc.implementation.createDocument("http://www.w3.org/2000/svg", " svg", null);
fs 2016/03/09 16:06:48 You don't need to create another document (to just
hyunjunekim2 2016/03/10 15:00:44 Done.
10 var svgElement = svgDoc.documentElement;
11 var g = svgDoc.createElementNS("http://www.w3.org/2000/svg", "g");
12 svgElement.appendChild(g);
13 body.appendChild(svgDoc.documentElement);
14 var title1 = doc.createElementNS("http://www.w3.org/1999/xhtml", "title");
15 title1.textContext = "title1";
16 g.appendChild(title1);
17 assert_equals(doc.title,'');
18 var title2 = doc.createElementNS("http://www.w3.org/1999/xhtml", "title");
19 title2.textContext = "title2";
20 svgElement.appendChild(title2);
21 assert_equals(doc.title,'');
22 }, "Test for setting title element of inner svg document.");
23 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698