Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / MutationObserver / parser-mutations.html
blob3ab340acd5f7f870f21536922d6a75d492bb0cf4
1 <!DOCTYPE html>
3 <body>
4 <script src="../../../resources/js-test.js"></script>
6 <script>
7 if (window.testRunner)
8 testRunner.dumpAsText();
10 window.mutations = [];
11 var observer = new MutationObserver(function(mutations, observer) {
12 window.mutations = window.mutations.concat(mutations);
13 });
14 observer.observe(document.body, {childList: true, subtree:true});
15 </script>
17 <p>
18 Mutation records should be delivered for all parser mutations after the above script.
19 </p>
21 <!-- Test parserRemoveChild and takeAllChildrenFrom doing the adoption agency algorithm. -->
22 <a><figure><iframe></iframe></a>
24 <!-- Test parserInsertBefore doing hoisting of elements from tables. -->
25 <table>
26 <div></div>
27 </table>
29 <script>
30 shouldBe('mutations.length', '22');
31 for (var i = 0; i < mutations.length; i++)
32 shouldBeEqualToString('mutations[' + i + '].type', 'childList');
33 shouldBeEqualToString('mutations[1].target.tagName', 'BODY');
34 shouldBe('mutations[1].addedNodes.length', '1');
35 shouldBeEqualToString('mutations[1].addedNodes[0].tagName', 'P');
36 shouldBeEqualToString('mutations[9].target.tagName', 'A');
37 shouldBeEqualToString('mutations[9].removedNodes[0].tagName', 'FIGURE');
38 shouldBe('mutations[9].removedNodes.length', '1');
39 shouldBe('mutations[9].addedNodes.length', '0');
40 shouldBeEqualToString('mutations[18].target.tagName', 'FIGURE');
41 shouldBe('mutations[18].addedNodes.length', '1');
42 shouldBe('mutations[18].removedNodes.length', '0');
43 shouldBeEqualToString('mutations[18].addedNodes[0].tagName', 'DIV');
44 </script>
45 </body>