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

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 test(function() {
6 var doc = document.implementation.createDocument("http://www.w3.org/2000/svg", "svg", null);
7 doc.title = 'old';
8 var titleElement = doc.querySelector('title');
9 var observer = new MutationObserver(function(mutations) {
10 assert_equals(mutations.length, 1);
11 assert_equals(mutations[0].type, 'childList');
12 assert_equals(mutations[0].addedNodes[0].data, 'new');
13 assert_equals(mutations[0].addedNodes.length, 1);
14 assert_equals(mutations[0].removedNodes[0].data, 'old');
15 assert_equals(mutations[0].removedNodes.length, 1);
16 });
17
18 observer.observe(titleElement, { childList: true });
19 doc.title = 'new';
20 }, "Test for mutations to childList when setting title of svg document.");
21 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698