Bug 1402170 - Move tests for easing values on keyframes to processing-a-keyframes-argument-002.html; r?hiro draft
authorBrian Birtles <birtles@gmail.com>
Fri, 22 Sep 2017 15:58:37 +0900
changeset 673230 5f61687b2adae3dba91926df06eaea1796c13868
parent 673229 4e199d710850d763daaf7fbde12795af06c0eb3f
child 673231 01f2208a99fddb3dce7c52b8bbb618429bef35cf
push id82504
push userbmo:bbirtles@mozilla.com
push dateMon, 02 Oct 2017 05:09:17 +0000
reviewershiro
bugs1402170
milestone58.0a1
Bug 1402170 - Move tests for easing values on keyframes to processing-a-keyframes-argument-002.html; r?hiro MozReview-Commit-ID: LEydYxdMoay
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/web-animations/interfaces/KeyframeEffect/constructor.html
testing/web-platform/tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -379870,16 +379870,22 @@
     ]
    ],
    "web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html": [
     [
      "/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html",
      {}
     ]
    ],
+   "web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002.html": [
+    [
+     "/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002.html",
+     {}
+    ]
+   ],
    "web-animations/interfaces/KeyframeEffect/setKeyframes.html": [
     [
      "/web-animations/interfaces/KeyframeEffect/setKeyframes.html",
      {}
     ]
    ],
    "web-animations/interfaces/KeyframeEffect/setTarget.html": [
     [
@@ -631206,17 +631212,17 @@
    "3a626b145f4eb77e816b9020f6fc67630088a00b",
    "testharness"
   ],
   "web-animations/interfaces/KeyframeEffect/composite.html": [
    "2580086b2da9b29d1645484c5ad4e59636a370e5",
    "testharness"
   ],
   "web-animations/interfaces/KeyframeEffect/constructor.html": [
-   "82d2eefd0a3755fc352d7dbe773139a92fee452c",
+   "118fe0f52ea654d57411598061b651bdde45ea7c",
    "testharness"
   ],
   "web-animations/interfaces/KeyframeEffect/copy-contructor.html": [
    "e1dfb5c05807a37974ecce98bb8c683cc291bfe4",
    "testharness"
   ],
   "web-animations/interfaces/KeyframeEffect/getComputedTiming.html": [
    "c9dcf7c17010e5495007e000b33aeb4dc89f92b7",
@@ -631225,16 +631231,20 @@
   "web-animations/interfaces/KeyframeEffect/iterationComposite.html": [
    "2ed50cdb27335345015d8b13c64ef86c67048757",
    "testharness"
   ],
   "web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html": [
    "e134685cad160d4c4abd6fd4917e26f87f4ae8df",
    "testharness"
   ],
+  "web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002.html": [
+   "75176cb31c3c829fa7ce5fb58cbf4c97160b5d99",
+   "testharness"
+  ],
   "web-animations/interfaces/KeyframeEffect/setKeyframes.html": [
    "2982bb6f57bb52c6e4e0483e4e47b22868a6010d",
    "testharness"
   ],
   "web-animations/interfaces/KeyframeEffect/setTarget.html": [
    "8c75e6605a134c96e261e5383414b7e15b32d121",
    "testharness"
   ],
--- a/testing/web-platform/tests/web-animations/interfaces/KeyframeEffect/constructor.html
+++ b/testing/web-platform/tests/web-animations/interfaces/KeyframeEffect/constructor.html
@@ -28,73 +28,27 @@ test(function(t) {
   });
 }, "a KeyframeEffectReadOnly can be constructed with no frames");
 
 test(function(t) {
   gEasingValueTests.forEach(function(subtest) {
     var easing = subtest[0];
     var expected = subtest[1];
     var effect = new KeyframeEffectReadOnly(target, {
-      left: ["10px", "20px"],
-      easing: easing
-    });
-    assert_equals(effect.getKeyframes()[0].easing, expected,
-                  "resulting easing for '" + easing + "'");
-  });
-}, "easing values are parsed correctly when passed to the " +
-   "KeyframeEffectReadOnly constructor in a property-indexed keyframe");
-
-test(function(t) {
-  gEasingValueTests.forEach(function(subtest) {
-    var easing = subtest[0];
-    var expected = subtest[1];
-    var effect = new KeyframeEffectReadOnly(target, [
-      { offset: 0, left: "10px", easing: easing },
-      { offset: 1, left: "20px" }
-    ]);
-    assert_equals(effect.getKeyframes()[0].easing, expected,
-                  "resulting easing for '" + easing + "'");
-  });
-}, "easing values are parsed correctly when passed to the " +
-   "KeyframeEffectReadOnly constructor in regular keyframes");
-
-test(function(t) {
-  gEasingValueTests.forEach(function(subtest) {
-    var easing = subtest[0];
-    var expected = subtest[1];
-    var effect = new KeyframeEffectReadOnly(target, {
       left: ["10px", "20px"]
     }, { easing: easing });
     assert_equals(effect.timing.easing, expected,
                   "resulting easing for '" + easing + "'");
   });
 }, "easing values are parsed correctly when passed to the " +
    "KeyframeEffectReadOnly constructor in KeyframeEffectOptions");
 
 test(function(t) {
   gInvalidEasings.forEach(invalidEasing => {
     assert_throws(new TypeError, () => {
-      new KeyframeEffectReadOnly(target, { easing: invalidEasing });
-    }, `TypeError is thrown for easing '${invalidEasing}'`);
-  });
-}, 'invalid easing values are correctly rejected when passed to the ' +
-   'KeyframeEffectReadOnly constructor in regular keyframes');
-
-test(function(t) {
-  gInvalidEasings.forEach(invalidEasing => {
-    assert_throws(new TypeError, () => {
-      new KeyframeEffectReadOnly(target, [{ easing: invalidEasing }]);
-    }, `TypeError is thrown for easing '${invalidEasing}'`);
-  });
-}, 'invalid easing values are correctly rejected when passed to the ' +
-   'KeyframeEffectReadOnly constructor in a keyframe sequence');
-
-test(function(t) {
-  gInvalidEasings.forEach(invalidEasing => {
-    assert_throws(new TypeError, () => {
       new KeyframeEffectReadOnly(target, null, { easing: invalidEasing });
     }, `TypeError is thrown for easing '${invalidEasing}'`);
   });
 }, 'invalid easing values are correctly rejected when passed to the ' +
    'KeyframeEffectReadOnly constructor in KeyframeEffectOptions');
 
 test(function(t) {
   var getKeyframe = function(composite) {
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>Tests for processing a keyframes argument (easing)</title>
+<link rel="help" href="https://w3c.github.io/web-animations/#processing-a-keyframes-argument">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../../testcommon.js"></script>
+<script src="../../resources/keyframe-utils.js"></script>
+<script src="../../resources/easing-tests.js"></script>
+<body>
+<div id="log"></div>
+<div id="target"></div>
+<script>
+'use strict';
+
+test(function(t) {
+  gEasingValueTests.forEach(function(subtest) {
+    var easing = subtest[0];
+    var expected = subtest[1];
+    var effect = new KeyframeEffectReadOnly(target, {
+      left: ["10px", "20px"],
+      easing: easing
+    });
+    assert_equals(effect.getKeyframes()[0].easing, expected,
+                  "resulting easing for '" + easing + "'");
+  });
+}, "easing values are parsed correctly when passed to the " +
+   "KeyframeEffectReadOnly constructor in a property-indexed keyframe");
+
+test(function(t) {
+  gEasingValueTests.forEach(function(subtest) {
+    var easing = subtest[0];
+    var expected = subtest[1];
+    var effect = new KeyframeEffectReadOnly(target, [
+      { offset: 0, left: "10px", easing: easing },
+      { offset: 1, left: "20px" }
+    ]);
+    assert_equals(effect.getKeyframes()[0].easing, expected,
+                  "resulting easing for '" + easing + "'");
+  });
+}, "easing values are parsed correctly when passed to the " +
+   "KeyframeEffectReadOnly constructor in regular keyframes");
+
+test(function(t) {
+  gInvalidEasings.forEach(invalidEasing => {
+    assert_throws(new TypeError, () => {
+      new KeyframeEffectReadOnly(target, { easing: invalidEasing });
+    }, `TypeError is thrown for easing '${invalidEasing}'`);
+  });
+}, 'invalid easing values are correctly rejected when passed to the ' +
+   'KeyframeEffectReadOnly constructor in regular keyframes');
+
+test(function(t) {
+  gInvalidEasings.forEach(invalidEasing => {
+    assert_throws(new TypeError, () => {
+      new KeyframeEffectReadOnly(target, [{ easing: invalidEasing }]);
+    }, `TypeError is thrown for easing '${invalidEasing}'`);
+  });
+}, 'invalid easing values are correctly rejected when passed to the ' +
+   'KeyframeEffectReadOnly constructor in a keyframe sequence');
+
+</script>