| OLD | NEW |
| (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> | |
| OLD | NEW |