Backed out changeset 04420ed3c036 (bug 1127380) for test failures in test_animation-playbackrate.html
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Mon, 06 Jul 2015 15:40:14 +0200
changeset 275872 a1017a7caaa3880a1339997f8b3407ee3e0b3d4e
parent 275871 2ad242267d9e49ea1652bc256e1d6db19cdb5dee
child 275873 8539750f5444e2cea69791fbea5bd61550743dba
push id3246
push usergijskruitbosch@gmail.com
push dateTue, 07 Jul 2015 09:06:38 +0000
bugs1127380
milestone42.0a1
backs out04420ed3c03678d0276c739df3b7e0830eae56e3
Backed out changeset 04420ed3c036 (bug 1127380) for test failures in test_animation-playbackrate.html
dom/animation/test/css-animations/file_animation-playbackrate.html
dom/animation/test/css-animations/test_animation-playbackrate.html
dom/animation/test/mochitest.ini
deleted file mode 100644
--- a/dom/animation/test/css-animations/file_animation-playbackrate.html
+++ /dev/null
@@ -1,105 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="../testcommon.js"></script>
-<style>
-div {
-  /* Make it easier to calculate expected values: */
-  animation-timing-function: linear ! important;
-}
-
-@keyframes anim {
-  from { margin-left: 100px; }
-  to { margin-left: 200px; }
-}
-</style>
-<body>
-<script>
-'use strict';
-
-function assert_playbackrate(animation,
-                             previousAnimationCurrentTime,
-                             previousTimelineCurrentTime,
-                             description) {
-  var accuracy = 0.001; /* accuracy of DOMHighResTimeStamp */
-
-  var animationCurrentTimeDifference =
-    animation.currentTime - previousAnimationCurrentTime;
-  var timelineCurrentTimeDifference =
-    animation.timeline.currentTime - previousTimelineCurrentTime;
-
-  assert_approx_equals(animationCurrentTimeDifference,
-                       timelineCurrentTimeDifference * animation.playbackRate,
-                       accuracy,
-                       description);
-}
-
-async_test(function(t) {
-  var div = addDiv(test, {'style': 'animation: anim 10s'});
-  var animation = div.getAnimations()[0];
-
-  animation.ready.then(t.step_func_done(function() {
-    animation.currentTime = 7000; // ms
-    animation.playbackRate = 0.5;
-
-    assert_equals(animation.currentTime, 7000,
-      'Reducing Animation.playbackRate should not change the currentTime ' +
-      'of a playing animation');
-
-    animation.playbackRate = 2;
-
-    assert_equals(animation.currentTime, 7000,
-      'Increasing Animation.playbackRate should not change the currentTime ' +
-      'of a playing animation');
-  }));
-}, 'Test the initial effect of setting playbackRate on currentTime');
-
-async_test(function(t) {
-  var div = addDiv(test, {'style': 'animation: anim 10s'});
-  var animation = div.getAnimations()[0];
-
-  animation.playbackRate = 10;
-
-  var previousTimelineCurrentTime;
-  var previousAnimationCurrentTime;
-
-  animation.ready.then(function() {
-    previousAnimationCurrentTime = animation.currentTime;
-    previousTimelineCurrentTime = animation.timeline.currentTime;
-    return waitForFrame();
-  }).then(t.step_func_done(function() {
-    assert_playbackrate(animation,
-      previousAnimationCurrentTime,
-      previousTimelineCurrentTime,
-      'animation.currentTime should be 10 times faster than timeline.');
-  }));
-}, 'Test the effect of setting playbackRate on currentTime');
-
-async_test(function(t) {
-  var div = addDiv(test, {'style': 'animation: anim 10s'});
-  var animation = div.getAnimations()[0];
-
-  animation.playbackRate = 10;
-
-  var previousTimelineCurrentTime;
-  var previousAnimationCurrentTime;
-
-  animation.ready.then(function() {
-    previousAnimationCurrentTime = animation.currentTime;
-    previousTimelineCurrentTime = animation.timeline.currentTime;
-
-    animation.playbackRate = 1;
-
-    return waitForFrame();
-  }).then(t.step_func_done(function() {
-    assert_equals(animation.playbackRate, 1,
-      'sanity check: animation.playbackRate is still 1.');
-    assert_playbackrate(animation,
-      previousAnimationCurrentTime,
-      previousTimelineCurrentTime,
-      'animation.currentTime should be the same speed as timeline now.');
-  }));
-}, 'Test the effect of setting playbackRate while playing animation');
-
-done();
-</script>
-</body>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_animation-playbackrate.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_animation-playbackrate.html");
-  });
-</script>
-</html>
--- a/dom/animation/test/mochitest.ini
+++ b/dom/animation/test/mochitest.ini
@@ -11,19 +11,16 @@ support-files = css-animations/file_anim
 [css-animations/test_animation-finish.html]
 support-files = css-animations/file_animation-finish.html
 [css-animations/test_animation-finished.html]
 support-files = css-animations/file_animation-finished.html
 [css-animations/test_animation-pausing.html]
 support-files = css-animations/file_animation-pausing.html
 [css-animations/test_animation-play.html]
 support-files = css-animations/file_animation-play.html
-[css-animations/test_animation-playbackrate.html]
-skip-if = os == 'android'
-support-files = css-animations/file_animation-playbackrate.html
 [css-animations/test_animation-playstate.html]
 support-files = css-animations/file_animation-playstate.html
 [css-animations/test_animation-ready.html]
 support-files = css-animations/file_animation-ready.html
 [css-animations/test_animation-starttime.html]
 support-files = css-animations/file_animation-starttime.html
 [css-animations/test_effect-name.html]
 support-files = css-animations/file_effect-name.html