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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/svg/animations/discard-check-removal-order.html
diff --git a/LayoutTests/svg/animations/discard-check-removal-order.html b/LayoutTests/svg/animations/discard-check-removal-order.html
new file mode 100755
index 0000000000000000000000000000000000000000..7df5a8139458da7919ca5594aa78fbc6221b7dea
--- /dev/null
+++ b/LayoutTests/svg/animations/discard-check-removal-order.html
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML>
+<html>
+<body onload="startTest()">
+ This tests for the remove order of discard elements.<br/>
+ <div id="removeOrder"></div>
+ <svg id="svg" width="400" height="400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <rect id="rect" width="100" height="100" fill="green" />
+ <animate id="animate" xlink:href="#rect" attributeName="x" from="0" to="300" begin="0s" dur="10s" />
+ <discard xlink:href="#animate" begin="0s" />
+ <discard xlink:href="#rect" begin="0s" />
+ </svg>
+ <script>
+ var removedNodes = new Array();
+ var callback = function(mutations) {
+ mutations.forEach( function(mutation) {
+ var nodeList = mutation.removedNodes;
+ for (var i = 0; i < nodeList.length; ++i) {
+ removedNodes.push(nodeList[i].nodeName);
+ }
+ });
+ };
+ var observer = new MutationObserver(callback);
+ var target = document.getElementById("svg");
+ options = { 'childList': true, 'subtree': true }
+ observer.observe(target, options);
+
+ function startTest() {
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+ setTimeout(function() {
+ document.getElementById('removeOrder').textContent = 'Discard node removal order: ' + removedNodes.toString();
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.notifyDone();
+ }
+ }, 10);
+ }
+ </script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698