| Index: third_party/WebKit/LayoutTests/imported/wpt/web-animations/animation-model/animation-types/addition-per-property.html
|
| diff --git a/third_party/WebKit/LayoutTests/imported/wpt/web-animations/animation-model/animation-types/addition-per-property.html b/third_party/WebKit/LayoutTests/imported/wpt/web-animations/animation-model/animation-types/addition-per-property.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b6210c6df31a2b8afac3e4b639b9b5d9e06644ef
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/imported/wpt/web-animations/animation-model/animation-types/addition-per-property.html
|
| @@ -0,0 +1,57 @@
|
| +<!doctype html>
|
| +<meta charset=utf-8>
|
| +<title>Tests for animation type of addition</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 'testAddition'.
|
| + // 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, 'testAddition', animationTypeString +
|
| + ' should have testAddition property');
|
| + assert_equals(typeof typeObject.testAddition, 'function',
|
| + 'testAddition method should be a function');
|
| + }, animationTypeString + ' has testAddition function');
|
| +
|
| + if (typeObject.testAddition &&
|
| + typeof typeObject.testAddition === 'function') {
|
| + typeObject.testAddition(property,
|
| + setupFunction,
|
| + animationType.options);
|
| + }
|
| + });
|
| +}
|
| +</script>
|
|
|