Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / animations / discard-check-removal-order.html
blob7df5a8139458da7919ca5594aa78fbc6221b7dea
1 <!DOCTYPE HTML>
2 <html>
3 <body onload="startTest()">
4 This tests for the remove order of discard elements.<br/>
5 <div id="removeOrder"></div>
6 <svg id="svg" width="400" height="400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
7 <rect id="rect" width="100" height="100" fill="green" />
8 <animate id="animate" xlink:href="#rect" attributeName="x" from="0" to="300" begin="0s" dur="10s" />
9 <discard xlink:href="#animate" begin="0s" />
10 <discard xlink:href="#rect" begin="0s" />
11 </svg>
12 <script>
13 var removedNodes = new Array();
14 var callback = function(mutations) {
15 mutations.forEach( function(mutation) {
16 var nodeList = mutation.removedNodes;
17 for (var i = 0; i < nodeList.length; ++i) {
18 removedNodes.push(nodeList[i].nodeName);
20 });
22 var observer = new MutationObserver(callback);
23 var target = document.getElementById("svg");
24 options = { 'childList': true, 'subtree': true }
25 observer.observe(target, options);
27 function startTest() {
28 if (window.testRunner)
29 testRunner.waitUntilDone();
30 setTimeout(function() {
31 document.getElementById('removeOrder').textContent = 'Discard node removal order: ' + removedNodes.toString();
32 if (window.testRunner) {
33 testRunner.dumpAsText();
34 testRunner.notifyDone();
36 }, 10);
38 </script>
39 </body>
40 </html>