Backed out changeset 77d83926c43d (bug 1253507) eslinter failures
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Wed, 23 Mar 2016 14:52:20 +0100
changeset 325460 1b8bc2d613eda3f743d4209f4d1ba7ef323defc1
parent 325459 b39f70d900f792128d6f34b11210460817820c5a
child 325461 e59f963b1a1560b76a9af111b7bf1bfe23b092c3
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1253507
milestone47.0a2
backs out77d83926c43db009ed98d9e29f79619be0fda04e
Backed out changeset 77d83926c43d (bug 1253507) eslinter failures
devtools/client/animationinspector/test/doc_multiple_animation_types.html
dom/animation/test/chrome.ini
dom/animation/test/chrome/test_animation_observers.html
dom/animation/test/chrome/test_restyles.html
dom/animation/test/chrome/test_running_on_compositor.html
dom/animation/test/crashtests/crashtests.list
dom/webidl/Animatable.webidl
layout/reftests/web-animations/reftest.list
layout/style/test/mochitest.ini
testing/web-platform/meta/web-animations/animatable/__dir__.ini
testing/web-platform/meta/web-animations/animation-effect-timing/duration.html.ini
testing/web-platform/meta/web-animations/animation-effect-timing/getAnimations.html.ini
testing/web-platform/meta/web-animations/animation-effect-timing/getComputedStyle.html.ini
testing/web-platform/meta/web-animations/keyframe-effect/effect-easing.html.ini
testing/web-platform/meta/web-animations/keyframe-effect/getComputedTiming-currentIteration.html.ini
testing/web-platform/meta/web-animations/keyframe-effect/getComputedTiming-progress.html.ini
--- a/devtools/client/animationinspector/test/doc_multiple_animation_types.html
+++ b/devtools/client/animationinspector/test/doc_multiple_animation_types.html
@@ -43,18 +43,18 @@
 
   <script>
     "use strict";
 
     setTimeout(function() {
       document.querySelector(".css-transition").style.backgroundColor = "yellow";
     }, 0);
 
-    // Element.animate() is disabled in Firefox 47, so do it the long way.
-    let effect = new KeyframeEffect(document.querySelector(".script-animation"),
-                                    [ { opacity: 1, offset: 0 },
-                                      { opacity: .1, offset: 1 } ],
-                                      { duration: 10000, fill: "forwards" });
-    let animation = new Animation(effect, document.timeline);
-    animation.play();
+    document.querySelector(".script-animation").animate([
+      {opacity: 1, offset: 0},
+      {opacity: .1, offset: 1}
+    ], {
+      duration: 10000,
+      fill: "forwards"
+    });
   </script>
 </body>
 </html>
--- a/dom/animation/test/chrome.ini
+++ b/dom/animation/test/chrome.ini
@@ -1,9 +1,13 @@
 [DEFAULT]
 support-files =
   testcommon.js
   ../../imptests/testharness.js
   ../../imptests/testharnessreport.js
+[chrome/test_animate_xrays.html]
+# file_animate_xrays.html needs to go in mochitest.ini since it is served
+# over HTTP
 [chrome/test_animation_observers.html]
+[chrome/test_animation_property_state.html]
 [chrome/test_restyles.html]
 [chrome/test_running_on_compositor.html]
 skip-if = buildapp == 'b2g'
--- a/dom/animation/test/chrome/test_animation_observers.html
+++ b/dom/animation/test/chrome/test_animation_observers.html
@@ -1465,16 +1465,57 @@ addAsyncAnimTest("tree_ordering", { obse
                  "records after finishing");
 
   // Clean up
   div.style = "";
   childA.remove();
   childB.remove();
 });
 
+
+addAsyncAnimTest("change_duration_and_currenttime",
+                 { observe: div, subtree: true }, function*() {
+  var anim = div.animate({ opacity: [ 0, 1 ] }, 100000);
+  yield await_frame();
+  assert_records([{ added: [anim], changed: [], removed: [] }],
+                 "records after animation is added");
+
+  anim.effect.timing.duration = 10000;
+  yield await_frame();
+
+  assert_records([{ added: [], changed: [anim], removed: [] }],
+                 "records after duration is changed");
+
+  anim.effect.timing.duration = 10000;
+  yield await_frame();
+  assert_records([], "records after assigning same value");
+
+  anim.currentTime = 50000;
+  yield await_frame();
+  assert_records([{ added: [], changed: [], removed: [anim] }],
+                 "records after animation end");
+
+  anim.effect.timing.duration = 100000;
+  yield await_frame();
+  assert_records([{ added: [anim], changed: [], removed: [] }],
+                 "records after animation restarted");
+
+  anim.effect.timing.duration = "auto";
+  yield await_frame();
+  assert_records([{ added: [], changed: [], removed: [anim] }],
+                 "records after duration set \"auto\"");
+
+  anim.effect.timing.duration = "auto";
+  yield await_frame();
+  assert_records([], "records after assigning same value \"auto\"");
+
+  anim.cancel();
+  yield await_frame();
+});
+
 // Run the tests.
 SimpleTest.requestLongerTimeout(2);
 SimpleTest.waitForExplicitFinish();
 
 runAllAsyncTests().then(function() {
   SimpleTest.finish();
 }, function(aError) {
   ok(false, "Something failed: " + aError);
--- a/dom/animation/test/chrome/test_restyles.html
+++ b/dom/animation/test/chrome/test_restyles.html
@@ -340,12 +340,33 @@ waitForAllPaints(function() {
     animation.currentTime = 50000; // 50s
 
     var markers = yield observeStyling(5);
     is(markers.length, 1,
        'Bug 1235478: Animations running on the compositor should only once ' +
        'update style when currentTime is set to middle of duration time');
     yield ensureElementRemoval(div);
   });
+
+  add_task_if_omta_enabled(function* change_duration_and_currenttime() {
+    var div = addDiv(null);
+    var animation = div.animate({ opacity: [ 0, 1 ] }, 10000);
+
+    yield animation.ready;
+    ok(animation.isRunningOnCompositor);
+
+    animation.currentTime = 50000;
+
+    ok(!animation.isRunningOnCompositor);
+
+    animation.effect.timing.duration = 100000;
+    var markers = yield observeStyling(5);
+    is(markers.length, 1,
+       'Animations running on the compositor should update style' +
+       'when timing.duration is made longer than the current time');
+
+    yield ensureElementRemoval(div);
+  });
+
 });
 
 </script>
 </body>
--- a/dom/animation/test/chrome/test_running_on_compositor.html
+++ b/dom/animation/test/chrome/test_running_on_compositor.html
@@ -280,11 +280,53 @@ promise_test(function(t) {
        'If an animation has a property that can run on the compositor and a '
        + 'property that cannot (due to Gecko limitations) but where the latter'
        + 'property is overridden in the CSS cascade, the animation should '
        + 'still report that it is running on the compositor');
   }));
 }, 'isRunningOnCompositor is true when a property that would otherwise block ' +
    'running on the compositor is overridden in the CSS cascade');
 
+promise_test(function(t) {
+  var div = addDiv(t);
+  var animation = div.animate({ opacity: [ 0, 1 ] }, 100000);
+
+  return animation.ready.then(t.step_func(function() {
+    assert_equals(animation.isRunningOnCompositor, omtaEnabled,
+      'Animation reports that it is running on the compositor');
+
+    animation.currentTime = 50000;
+    animation.effect.timing.duration = 10000;
+
+    assert_equals(animation.isRunningOnCompositor, false,
+       'Animation reports that it is NOT running on the compositor'
+       + ' when the animation is set a shorter duration than current time');
+  }));
+}, 'animation is immediately removed from compositor' +
+   'when timing.duration is made shorter than the current time');
+
+promise_test(function(t) {
+  var div = addDiv(t);
+  var animation = div.animate({ opacity: [ 0, 1 ] }, 10000);
+
+  return animation.ready.then(t.step_func(function() {
+    assert_equals(animation.isRunningOnCompositor, omtaEnabled,
+      'Animation reports that it is running on the compositor');
+
+    animation.currentTime = 50000;
+
+    assert_equals(animation.isRunningOnCompositor, false,
+      'Animation reports that it is NOT running on the compositor'
+      + ' when finished');
+
+    animation.effect.timing.duration = 100000;
+    return waitForFrame();
+  })).then(t.step_func(function() {
+    assert_equals(animation.isRunningOnCompositor, omtaEnabled,
+      'Animation reports that it is running on the compositor'
+      + ' when restarted');
+  }));
+}, 'animation is added to compositor' +
+   ' when timing.duration is made longer than the current time');
+
 </script>
 </script>
 </body>
--- a/dom/animation/test/crashtests/crashtests.list
+++ b/dom/animation/test/crashtests/crashtests.list
@@ -1,7 +1,8 @@
 pref(dom.animations-api.core.enabled,true) load 1239889-1.html
+pref(dom.animations-api.core.enabled,true) load 1244595-1.html
 pref(dom.animations-api.core.enabled,true) load 1216842-1.html
 pref(dom.animations-api.core.enabled,true) load 1216842-2.html
 pref(dom.animations-api.core.enabled,true) load 1216842-3.html
 pref(dom.animations-api.core.enabled,true) load 1216842-4.html
 pref(dom.animations-api.core.enabled,true) load 1216842-5.html
 pref(dom.animations-api.core.enabled,true) load 1216842-6.html
--- a/dom/webidl/Animatable.webidl
+++ b/dom/webidl/Animatable.webidl
@@ -11,16 +11,15 @@
  */
 
 dictionary KeyframeAnimationOptions : KeyframeEffectOptions {
   DOMString id = "";
 };
 
 [NoInterfaceObject]
 interface Animatable {
-  // Bug 1253507: Disabled in Firefox 47 branch
-  [ChromeOnly, Throws]
+  [Func="nsDocument::IsWebAnimationsEnabled", Throws]
   Animation animate(object? frames,
                     optional (unrestricted double or KeyframeAnimationOptions)
                       options);
   [Func="nsDocument::IsWebAnimationsEnabled"]
   sequence<Animation> getAnimations();
 };
--- a/layout/reftests/web-animations/reftest.list
+++ b/layout/reftests/web-animations/reftest.list
@@ -0,0 +1,1 @@
+test-pref(dom.animations-api.core.enabled,true) == 1246046-1.html green-box.html
--- a/layout/style/test/mochitest.ini
+++ b/layout/style/test/mochitest.ini
@@ -37,17 +37,21 @@ generated-files = css_properties.js
 
 [test_acid3_test46.html]
 [test_all_shorthand.html]
 [test_animations.html]
 skip-if = toolkit == 'android'
 [test_animations_async_tests.html]
 support-files = ../../reftests/fonts/Ahem.ttf file_animations_async_tests.html
 [test_animations_dynamic_changes.html]
+[test_animations_effect_timing_duration.html]
+support-files = file_animations_effect_timing_duration.html
 [test_animations_event_order.html]
+[test_animations_iterationstart.html]
+support-files = file_animations_iterationstart.html
 [test_animations_omta.html]
 [test_animations_omta_start.html]
 skip-if = (buildapp == 'b2g' && toolkit != 'gonk') # bug 1041017
 [test_animations_pausing.html]
 support-files = file_animations_pausing.html
 [test_animations_playbackrate.html]
 support-files = file_animations_playbackrate.html
 [test_animations_styles_on_event.html]
deleted file mode 100644
--- a/testing/web-platform/meta/web-animations/animatable/__dir__.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1245748
--- a/testing/web-platform/meta/web-animations/animation-effect-timing/duration.html.ini
+++ b/testing/web-platform/meta/web-animations/animation-effect-timing/duration.html.ini
@@ -1,3 +1,18 @@
 [duration.html]
   type: testharness
-  disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1245748
+  [set duration auto]
+    expected: FAIL
+    bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1237173
+
+  [set duration -100]
+    expected: FAIL
+    bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1237173
+
+  [set duration abc]
+    expected: FAIL
+    bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1237173
+
+  [set duration string 100]
+    expected: FAIL
+    bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1237173
+
deleted file mode 100644
--- a/testing/web-platform/meta/web-animations/animation-effect-timing/getAnimations.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[getAnimations.html]
-  type: testharness
-  disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1245748
deleted file mode 100644
--- a/testing/web-platform/meta/web-animations/animation-effect-timing/getComputedStyle.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[getComputedStyle.html]
-  type: testharness
-  disabled: bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1245748
--- a/testing/web-platform/meta/web-animations/keyframe-effect/effect-easing.html.ini
+++ b/testing/web-platform/meta/web-animations/keyframe-effect/effect-easing.html.ini
@@ -1,3 +1,14 @@
 [effect-easing.html]
   type: testharness
-  disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1245748
+  [steps(start) function]
+    expected: FAIL
+    bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1248532
+
+  [effect easing produces values greater than 1 with step-start keyframe]
+    expected: FAIL
+    bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1248532
+
+  [effect easing produces negative values with step-start keyframe]
+    expected: FAIL
+    bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1248532
+
deleted file mode 100644
--- a/testing/web-platform/meta/web-animations/keyframe-effect/getComputedTiming-currentIteration.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[getComputedTiming-currentIteration.html]
-  type: testharness
-  disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1245748
deleted file mode 100644
--- a/testing/web-platform/meta/web-animations/keyframe-effect/getComputedTiming-progress.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[getComputedTiming-progress.html]
-  type: testharness
-  disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1245748