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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/dom/svg-document-set-title-mutations.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: 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 var SVG_NAMESPACE = "http://www.w3.org/2000/svg";
6
7 function newSVGDocument() {
fs 2016/03/03 15:49:44 This is only used once, so just do this directly w
hyunjunekim2 2016/03/04 11:29:32 Done.
8 return document.implementation.createDocument(SVG_NAMESPACE, "svg", null);
9 }
10
11 test(function() {
12 var doc = newSVGDocument();
13 doc.title = 'old';
14 var titleElement = doc.querySelector('title');
15 var observer = new MutationObserver(function(mutations) {
16 assert_equals(mutations.length, 1);
17 assert_equals(mutations[0].type, 'childList');
18 assert_equals(mutations[0].addedNodes[0].data, 'new');
19 assert_equals(mutations[0].addedNodes.length, 1);
20 assert_equals(mutations[0].removedNodes[0].data, 'old');
21 assert_equals(mutations[0].removedNodes.length, 1);
22 });
23
24 observer.observe(titleElement, { childList: true });
25 doc.title = 'new';
26 }, "Test for mutations to childList when setting title of svg document.");
27 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698