Bug 1209405 - Part 5: Add animation test that changes 'display' attribute. r=birtles draft
authorDaisuke Akatsuka <daisuke@mozilla-japan.org>
Mon, 23 May 2016 10:47:27 +0900
changeset 369547 58af9fa1f93bfc81607cc27359056a611deec053
parent 369546 6de4b17886ddf2f63df96714a4e8cd20faf72d89
child 369548 e7748e8b135c13284599a7da709acd7fa4526de8
child 369549 002bbf2852f51c664797b62767a1ff76cad30bae
push id18843
push userbmo:daisuke@mozilla-japan.org
push dateMon, 23 May 2016 01:50:40 +0000
reviewersbirtles
bugs1209405
milestone49.0a1
Bug 1209405 - Part 5: Add animation test that changes 'display' attribute. r=birtles MozReview-Commit-ID: BYxlY83O83x
layout/reftests/svg/smil/anim-display-in-g-element.svg
layout/reftests/svg/smil/anim-display.svg
layout/reftests/svg/smil/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/smil/anim-display-in-g-element.svg
@@ -0,0 +1,23 @@
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink"
+     class="reftest-wait">
+
+  <title>Test animation that changes 'display' attribute on an element that is not the immediate parent</title>
+  <script xlink:href="smil-util.js" type="text/javascript"/>
+
+  <g display="none" id="g">
+    <rect width="100%" height="100%" fill="lime">
+      <animate xlink:href="#g"
+               attributeName="display"
+               values="none;inline"
+               calcMode="discrete"
+               dur="100s"/>
+    </rect>
+  </g>
+
+  <script>
+    window.addEventListener("MozReftestInvalidate", function() {
+      setTimeAndWaitToSnapshot(49.9, 0.1);
+    });
+  </script>
+</svg>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/smil/anim-display.svg
@@ -0,0 +1,20 @@
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink"
+     class="reftest-wait">
+
+  <title>Test animation that changes 'display' attribute</title>
+  <script xlink:href="smil-util.js" type="text/javascript"/>
+
+  <rect display="none" width="100%" height="100%" fill="lime">
+    <animate attributeName="display"
+             values="none;inline"
+             calcMode="discrete"
+             dur="100s"/>
+  </rect>
+
+  <script>
+    window.addEventListener("MozReftestInvalidate", function() {
+      setTimeAndWaitToSnapshot(49.9, 0.1);
+    });
+  </script>
+</svg>
--- a/layout/reftests/svg/smil/reftest.list
+++ b/layout/reftests/svg/smil/reftest.list
@@ -269,9 +269,13 @@ fuzzy-if(cocoaWidget&&layersGPUAccelerat
 
 # Test filtering of excessive times
 == filtered-instance-time-1.svg anim-standard-ref.svg
 
 # Test animation using defs element
 == anim-defs-gradient-property.svg lime.svg
 == anim-defs-gradient-attribute.svg lime.svg
 == anim-defs-fill.svg lime.svg
-== anim-defs-width.svg lime.svg
\ No newline at end of file
+== anim-defs-width.svg lime.svg
+
+# Test animation that changes 'display' attribute
+== anim-display.svg lime.svg
+== anim-display-in-g-element.svg lime.svg