Bug 1315874 part 1 - Add mochitest for SMIL with CSS-Transition. r=dbaron draft
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Thu, 15 Dec 2016 12:20:04 +0900
changeset 449791 7b68e62deb1073be813b38f942632a916c286e20
parent 449264 489f981e8c2beb050d7faee956dd940431bdafe6
child 449792 49d08dcfed195ae3e10e7d1ed31365fc26d568e2
push id38663
push usermantaroh@gmail.com
push dateThu, 15 Dec 2016 03:26:56 +0000
reviewersdbaron
bugs1315874
milestone53.0a1
Bug 1315874 part 1 - Add mochitest for SMIL with CSS-Transition. r=dbaron MozReview-Commit-ID: D8zZTFkoY6p
dom/smil/test/mochitest.ini
dom/smil/test/test_smilWithTransition.html
--- a/dom/smil/test/mochitest.ini
+++ b/dom/smil/test/mochitest.ini
@@ -52,9 +52,10 @@ skip-if = toolkit == 'android' #TIMED_OU
 [test_smilSyncTransform.xhtml]
 [test_smilSyncbaseTarget.xhtml]
 [test_smilTextZoom.xhtml]
 [test_smilTimeEvents.xhtml]
 [test_smilTiming.xhtml]
 [test_smilTimingZeroIntervals.xhtml]
 [test_smilUpdatedInterval.xhtml]
 [test_smilValues.xhtml]
+[test_smilWithTransition.html]
 [test_smilXHR.xhtml]
new file mode 100644
--- /dev/null
+++ b/dom/smil/test/test_smilWithTransition.html
@@ -0,0 +1,37 @@
+<!doctype html>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=1315874
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test SMIL with CSS-Transitions (bug 1315874)</title>
+  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1315874">Mozilla Bug 1315874</a>
+<svg width="100%" height="1" onload="this.pauseAnimations()">
+  <rect width="100%" height="100%"
+        style="fill: red; transition: fill 1s" id="rect">
+    <animate attributeName="fill" to="lime" begin="-500ms" dur="1s" fill="freeze"/>
+  </rect>
+</svg>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+  // Animation doesn't start until onload
+  SimpleTest.waitForExplicitFinish();
+  window.addEventListener("DOMContentLoaded", runTests, false);
+
+  function runTests() {
+    var rect = document.getElementById("rect");
+    requestAnimationFrame(function(time) {
+      var anim = document.getAnimations()[0];
+      todo(!anim, "CSS-Transition shouldn't created by restyling of SMIL.");
+      SimpleTest.finish();
+    });
+  }
+</script>
+</pre>
+</body>
+</html>