Index: third_party/WebKit/LayoutTests/imported/wpt/web-animations/animation-model/animation-types/interpolation-per-property.html |
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/web-animations/animation-model/animation-types/interpolation-per-property.html b/third_party/WebKit/LayoutTests/imported/wpt/web-animations/animation-model/animation-types/interpolation-per-property.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9062116af10b83acef7f5c57900f734f44d86465 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/imported/wpt/web-animations/animation-model/animation-types/interpolation-per-property.html |
@@ -0,0 +1,57 @@ |
+<!DOCTYPE html> |
+<meta charset=utf-8> |
+<title>Tests for animation type of interpolation</title> |
+<link rel="help" href="https://w3c.github.io/web-animations/#animation-types"> |
+<script src="/resources/testharness.js"></script> |
+<script src="/resources/testharnessreport.js"></script> |
+<script src="../../testcommon.js"></script> |
+<script src="property-list.js"></script> |
+<script src="property-types.js"></script> |
+<style> |
+html { |
+ font-size: 10px; |
+} |
+</style> |
+<body> |
+<div id="log"></div> |
+<script> |
+'use strict'; |
+ |
+for (var property in gCSSProperties) { |
+ if (!isSupported(property)) { |
+ continue; |
+ } |
+ |
+ var animationTypes = gCSSProperties[property].types; |
+ var setupFunction = gCSSProperties[property].setup; |
+ animationTypes.forEach(function(animationType) { |
+ var typeObject; |
+ var 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; |
+ } |
+ |
+ // 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(function(t) { |
+ assert_own_property(typeObject, 'testInterpolation', animationTypeString + |
+ ' should have testInterpolation property'); |
+ assert_equals(typeof typeObject.testInterpolation, 'function', |
+ 'testInterpolation method should be a function'); |
+ }, animationTypeString + ' has testInterpolation function'); |
+ |
+ if (typeObject.testInterpolation && |
+ typeof typeObject.testInterpolation === 'function') { |
+ typeObject.testInterpolation(property, |
+ setupFunction, |
+ animationType.options); |
+ } |
+ }); |
+} |
+</script> |