Bug 1465815 [wpt PR 11276] - [web-animations] Fix timeout/0 tests in unsupporting browsers, a=testonly
authorSimon Pieters <zcorpan@gmail.com>
Wed, 06 Jun 2018 17:42:37 +0000
changeset 476491 d313a947c2056a9bf148032377b02f8b31641f87
parent 476490 3b88576150dfcb7024ed7b3003307462ce993572
child 476492 526c80fae7bc7c6faa4c5e13ef39cf82dd988991
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1465815, 11276, 11269
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1465815 [wpt PR 11276] - [web-animations] Fix timeout/0 tests in unsupporting browsers, a=testonly Automatic update from web-platform-tests[web-animations] Fix timeout/0 tests in unsupporting browsers Part of #11269. -- wpt-commits: ee6c9d315b05a2afe40a13cbf26d3126d52c34a0 wpt-pr: 11276
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/web-animations/animation-model/animation-types/accumulation-per-property.html
testing/web-platform/tests/web-animations/animation-model/animation-types/addition-per-property.html
testing/web-platform/tests/web-animations/animation-model/animation-types/interpolation-per-property.html
testing/web-platform/tests/web-animations/animation-model/animation-types/property-list.js
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -616895,33 +616895,33 @@
    "c4f52fc673833f80178284b30d6fc4bad1f581d2",
    "support"
   ],
   "web-animations/README.md": [
    "9dfaf5979c3bf30bf075b3929ac3620954e83497",
    "support"
   ],
   "web-animations/animation-model/animation-types/accumulation-per-property.html": [
-   "b26f3961d1913de731906ff0eed9a8548df7bbb2",
+   "40be406294368fc2eccb9a4e525c1f2bb40a3683",
    "testharness"
   ],
   "web-animations/animation-model/animation-types/addition-per-property.html": [
-   "c16ee3be3338bd5831ff3eab455cbf6943aa8d5b",
+   "0077ef18e19f57f2f6b1b312079a9c8d03bd1714",
    "testharness"
   ],
   "web-animations/animation-model/animation-types/discrete.html": [
    "f3e48d8ddd42f1eecb36af2a8e1cfade6d0a02d4",
    "testharness"
   ],
   "web-animations/animation-model/animation-types/interpolation-per-property.html": [
-   "2bcb2919b3034042d8a61d7af5de099a42386451",
+   "ab09cd8b77d05a1036f9976c3f0e92a6d9e183f3",
    "testharness"
   ],
   "web-animations/animation-model/animation-types/property-list.js": [
-   "3d3b60b27f20c298ccb7a3abb628054817f2b079",
+   "9416f470f1ac1d320bb4d46461938e85946439e2",
    "support"
   ],
   "web-animations/animation-model/animation-types/property-types.js": [
    "ecfe1d54d687bc6d0541b4a8c5ca9cf82c4d129e",
    "support"
   ],
   "web-animations/animation-model/animation-types/visibility.html": [
    "da3370704ca9e83a1171a64320a240e3145fab2c",
--- a/testing/web-platform/tests/web-animations/animation-model/animation-types/accumulation-per-property.html
+++ b/testing/web-platform/tests/web-animations/animation-model/animation-types/accumulation-per-property.html
@@ -12,46 +12,48 @@ html {
   font-size: 10px;
 }
 </style>
 <body>
 <div id="log"></div>
 <script>
 'use strict';
 
-for (const property in gCSSProperties) {
-  if (!isSupported(property)) {
-    continue;
-  }
-
-  const setupFunction = gCSSProperties[property].setup;
-  for (const animationType of gCSSProperties[property].types) {
-    let typeObject;
-    let animationTypeString;
-    if (typeof animationType === 'string') {
-      typeObject = types[animationType];
-      animationTypeString = animationType;
-    } else if (typeof animationType === 'object' &&
-               animationType.type && typeof animationType.type === 'string') {
-      typeObject = types[animationType.type];
-      animationTypeString = animationType.type;
+test(function() {
+  for (const property in gCSSProperties) {
+    if (!isSupported(property)) {
+      continue;
     }
 
-    // First, test that the animation type object has 'testAccumulation'.
-    // We use test() function here so that we can continue the remainder tests
-    // even if this test fails.
-    test(t => {
-      assert_own_property(typeObject, 'testAccumulation', animationTypeString +
-                          ' should have testAccumulation property');
-      assert_equals(typeof typeObject.testAccumulation, 'function',
-                    'testAccumulation method should be a function');
-    }, `${property} (type: ${animationTypeString}) has testAccumulation`
-       + ' function');
+    const setupFunction = gCSSProperties[property].setup;
+    for (const animationType of gCSSProperties[property].types) {
+      let typeObject;
+      let animationTypeString;
+      if (typeof animationType === 'string') {
+        typeObject = types[animationType];
+        animationTypeString = animationType;
+      } else if (typeof animationType === 'object' &&
+                 animationType.type && typeof animationType.type === 'string') {
+        typeObject = types[animationType.type];
+        animationTypeString = animationType.type;
+      }
 
-    if (typeObject.testAccumulation &&
-        typeof typeObject.testAccumulation === 'function') {
-      typeObject.testAccumulation(property,
-                              setupFunction,
-                              animationType.options);
+      // First, test that the animation type object has 'testAccumulation'.
+      // We use test() function here so that we can continue the remainder tests
+      // even if this test fails.
+      test(t => {
+        assert_own_property(typeObject, 'testAccumulation', animationTypeString +
+                            ' should have testAccumulation property');
+        assert_equals(typeof typeObject.testAccumulation, 'function',
+                      'testAccumulation method should be a function');
+      }, `${property} (type: ${animationTypeString}) has testAccumulation`
+         + ' function');
+
+      if (typeObject.testAccumulation &&
+          typeof typeObject.testAccumulation === 'function') {
+        typeObject.testAccumulation(property,
+                                setupFunction,
+                                animationType.options);
+      }
     }
   }
-}
+}, 'Setup');
 </script>
--- a/testing/web-platform/tests/web-animations/animation-model/animation-types/addition-per-property.html
+++ b/testing/web-platform/tests/web-animations/animation-model/animation-types/addition-per-property.html
@@ -12,46 +12,48 @@ html {
   font-size: 10px;
 }
 </style>
 <body>
 <div id="log"></div>
 <script>
 'use strict';
 
-for (const property in gCSSProperties) {
-  if (!isSupported(property)) {
-    continue;
-  }
-
-  const setupFunction = gCSSProperties[property].setup;
-  for (const animationType of gCSSProperties[property].types) {
-    let typeObject;
-    let animationTypeString;
-    if (typeof animationType === 'string') {
-      typeObject = types[animationType];
-      animationTypeString = animationType;
-    } else if (typeof animationType === 'object' &&
-               animationType.type && typeof animationType.type === 'string') {
-      typeObject = types[animationType.type];
-      animationTypeString = animationType.type;
+test(function() {
+  for (const property in gCSSProperties) {
+    if (!isSupported(property)) {
+      continue;
     }
 
-    // First, test that the animation type object has 'testAddition'.
-    // We use test() function here so that we can continue the remainder tests
-    // even if this test fails.
-    test(t => {
-      assert_own_property(typeObject, 'testAddition', animationTypeString +
-                          ' should have testAddition property');
-      assert_equals(typeof typeObject.testAddition, 'function',
-                    'testAddition method should be a function');
-    }, `${property} (type: ${animationTypeString}) has testAddition`
-       + ' function');
+    const setupFunction = gCSSProperties[property].setup;
+    for (const animationType of gCSSProperties[property].types) {
+      let typeObject;
+      let animationTypeString;
+      if (typeof animationType === 'string') {
+        typeObject = types[animationType];
+        animationTypeString = animationType;
+      } else if (typeof animationType === 'object' &&
+                 animationType.type && typeof animationType.type === 'string') {
+        typeObject = types[animationType.type];
+        animationTypeString = animationType.type;
+      }
 
-    if (typeObject.testAddition &&
-        typeof typeObject.testAddition === 'function') {
-      typeObject.testAddition(property,
-                              setupFunction,
-                              animationType.options);
+      // First, test that the animation type object has 'testAddition'.
+      // We use test() function here so that we can continue the remainder tests
+      // even if this test fails.
+      test(t => {
+        assert_own_property(typeObject, 'testAddition', animationTypeString +
+                            ' should have testAddition property');
+        assert_equals(typeof typeObject.testAddition, 'function',
+                      'testAddition method should be a function');
+      }, `${property} (type: ${animationTypeString}) has testAddition`
+         + ' function');
+
+      if (typeObject.testAddition &&
+          typeof typeObject.testAddition === 'function') {
+        typeObject.testAddition(property,
+                                setupFunction,
+                                animationType.options);
+      }
     }
   }
-}
+}, "Setup");
 </script>
--- a/testing/web-platform/tests/web-animations/animation-model/animation-types/interpolation-per-property.html
+++ b/testing/web-platform/tests/web-animations/animation-model/animation-types/interpolation-per-property.html
@@ -12,46 +12,48 @@ html {
   font-size: 10px;
 }
 </style>
 <body>
 <div id="log"></div>
 <script>
 'use strict';
 
-for (const property in gCSSProperties) {
-  if (!isSupported(property)) {
-    continue;
-  }
-
-  const setupFunction = gCSSProperties[property].setup;
-  for (const animationType of gCSSProperties[property].types) {
-    let typeObject;
-    let animationTypeString;
-    if (typeof animationType === 'string') {
-      typeObject = types[animationType];
-      animationTypeString = animationType;
-    } else if (typeof animationType === 'object' &&
-               animationType.type && typeof animationType.type === 'string') {
-      typeObject = types[animationType.type];
-      animationTypeString = animationType.type;
+test(function() {
+  for (const property in gCSSProperties) {
+    if (!isSupported(property)) {
+      continue;
     }
 
-    // First, test that the animation type object has 'testInterpolation'.
-    // We use test() function() here so that we can continue the remainder tests
-    // even if this test fails.
-    test(t => {
-      assert_own_property(typeObject, 'testInterpolation', animationTypeString +
-                          ' should have testInterpolation property');
-      assert_equals(typeof typeObject.testInterpolation, 'function',
-                    'testInterpolation method should be a function');
-    }, `${property} (type: ${animationTypeString}) has testInterpolation`
-       + ' function');
+    const setupFunction = gCSSProperties[property].setup;
+    for (const animationType of gCSSProperties[property].types) {
+      let typeObject;
+      let animationTypeString;
+      if (typeof animationType === 'string') {
+        typeObject = types[animationType];
+        animationTypeString = animationType;
+      } else if (typeof animationType === 'object' &&
+                 animationType.type && typeof animationType.type === 'string') {
+        typeObject = types[animationType.type];
+        animationTypeString = animationType.type;
+      }
 
-    if (typeObject.testInterpolation &&
-        typeof typeObject.testInterpolation === 'function') {
-      typeObject.testInterpolation(property,
-                                   setupFunction,
-                                   animationType.options);
+      // First, test that the animation type object has 'testInterpolation'.
+      // We use test() function() here so that we can continue the remainder tests
+      // even if this test fails.
+      test(t => {
+        assert_own_property(typeObject, 'testInterpolation', animationTypeString +
+                            ' should have testInterpolation property');
+        assert_equals(typeof typeObject.testInterpolation, 'function',
+                      'testInterpolation method should be a function');
+      }, `${property} (type: ${animationTypeString}) has testInterpolation`
+         + ' function');
+
+      if (typeObject.testInterpolation &&
+          typeof typeObject.testInterpolation === 'function') {
+        typeObject.testInterpolation(property,
+                                     setupFunction,
+                                     animationType.options);
+      }
     }
   }
-}
+}, 'Setup');
 </script>
--- a/testing/web-platform/tests/web-animations/animation-model/animation-types/property-list.js
+++ b/testing/web-platform/tests/web-animations/animation-model/animation-types/property-list.js
@@ -1551,16 +1551,17 @@ function testAnimationSampleRotate3d(ani
 }
 
 function createTestElement(t, setup) {
   return setup ? setup(t) : createElement(t);
 }
 
 function isSupported(property) {
   const testKeyframe = new TestKeyframe(propertyToIDL(property));
+  assert_not_equals(window.KeyframeEffect, undefined, 'window.KeyframeEffect');
   try {
     // Since TestKeyframe returns 'undefined' for |property|,
     // the KeyframeEffect constructor will throw
     // if the string 'undefined' is not a valid value for the property.
     new KeyframeEffect(null, testKeyframe);
   } catch(e) {}
   return testKeyframe.propAccessCount !== 0;
 }