| Index: third_party/WebKit/LayoutTests/imported/web-platform-tests/web-animations/keyframe-effect/setFrames.html
|
| diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/web-animations/keyframe-effect/setFrames.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/web-animations/keyframe-effect/setFrames.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7cf9c99064585f2c8bb05964b010934c8244e094
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/web-animations/keyframe-effect/setFrames.html
|
| @@ -0,0 +1,50 @@
|
| +<!DOCTYPE html>
|
| +<meta charset=utf-8>
|
| +<title>KeyframeEffect setFrames() tests</title>
|
| +<link rel="help" href="https://w3c.github.io/web-animations/#dom-keyframeeffect-setframes">
|
| +<script src="../../../../resources/testharness.js"></script>
|
| +<script src="../../../../resources/testharnessreport.js"></script>
|
| +<script src="../testcommon.js"></script>
|
| +<script src="../resources/keyframe-utils.js"></script>
|
| +<body>
|
| +<div id="log"></div>
|
| +<div id="target"></div>
|
| +<script>
|
| +'use strict';
|
| +
|
| +var target = document.getElementById('target');
|
| +
|
| +test(function(t) {
|
| + gEmptyKeyframeListTests.forEach(function(frame) {
|
| + var effect = new KeyframeEffect(target, {});
|
| + effect.setFrames(frame);
|
| + assert_frame_lists_equal(effect.getFrames(), []);
|
| + });
|
| +}, 'Keyframes can be replaced with an empty keyframe');
|
| +
|
| +gPropertyIndexedKeyframesTests.forEach(function(subtest) {
|
| + test(function(t) {
|
| + var effect = new KeyframeEffect(target, {});
|
| + effect.setFrames(subtest.input);
|
| + assert_frame_lists_equal(effect.getFrames(), subtest.output);
|
| + }, 'Keyframes can be replaced with ' + subtest.desc);
|
| +});
|
| +
|
| +gKeyframeSequenceTests.forEach(function(subtest) {
|
| + test(function(t) {
|
| + var effect = new KeyframeEffect(target, {});
|
| + effect.setFrames(subtest.input);
|
| + assert_frame_lists_equal(effect.getFrames(), subtest.output);
|
| + }, 'Keyframes can be replaced with ' + subtest.desc);
|
| +});
|
| +
|
| +gInvalidKeyframesTests.forEach(function(subtest) {
|
| + test(function(t) {
|
| + var effect = new KeyframeEffect(target, {});
|
| + assert_throws(subtest.expected, function() {
|
| + effect.setFrames(subtest.input);
|
| + });
|
| + }, 'KeyframeEffect constructor throws with ' + subtest.desc);
|
| +});
|
| +</script>
|
| +</body>
|
|
|