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

Side by Side Diff: LayoutTests/svg/animations/discard-check-removal-order.html

Issue 99533004: [SVG] Implement 'discard' element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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 <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" xmln s: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);
19 }
20 });
21 };
22 var observer = new MutationObserver(callback);
23 var target = document.getElementById("svg");
24 options = { 'childList': true, 'subtree': true }
25 observer.observe(target, options);
26
27 function startTest() {
28 if (window.testRunner)
29 testRunner.waitUntilDone();
30 setTimeout(function() {
31 document.getElementById('removeOrder').textContent = 'Discard node remov al order: ' + removedNodes.toString();
32 if (window.testRunner) {
33 testRunner.dumpAsText();
34 testRunner.notifyDone();
35 }
36 }, 10);
37 }
38 </script>
39 </body>
40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698