Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/virtual/threaded/animations/KeyframeEffectReadOnly-composited-animation.html |
| diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/animations/KeyframeEffectReadOnly-composited-animation.html b/third_party/WebKit/LayoutTests/virtual/threaded/animations/KeyframeEffectReadOnly-composited-animation.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..857163d5558e146b06e4cc662f98ee97ca0fed37 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/virtual/threaded/animations/KeyframeEffectReadOnly-composited-animation.html |
| @@ -0,0 +1,37 @@ |
| +<!DOCTYPE html> |
| +<meta charset=utf-8> |
| +<title>Animating with KeyframeEffectReadOnly objects</title> |
| +<script src="../../../resources/testharness.js"></script> |
| +<script src="../../../resources/testharnessreport.js"></script> |
| +<script src="../../../imported/wpt/web-animations/testcommon.js"></script> |
|
alancutter (OOO until 2018)
2016/10/28 03:38:32
Not sure we need to depend on this library for a s
|
| +<body> |
| +<script> |
| +"use strict"; |
| + |
| +async_test(function(t) { |
| + var target = createDiv(t); |
| + var effect = new KeyframeEffect(target, { opacity: [0, 0.9] }, 1000); |
| + var anim = target.animate(null); |
| + anim.effect = effect; |
| + |
| + var targetRO = createDiv(t); |
| + var effectRO = new KeyframeEffectReadOnly( |
| + targetRO, { opacity: [0, 0.9] }, 1000); |
| + var animRO = targetRO.animate(null); |
| + animRO.effect = effectRO; |
| + |
| + Promise.all([anim.ready, animRO.ready]).then(function() { |
| + t.step(function() { |
| + assert_true(internals.isCompositedAnimation(anim), |
| + "Opacity animation with KeyframeEffect should be composited"); |
| + assert_true(internals.isCompositedAnimation(animRO), |
| + "Opacity animation with KeyframeEffectReadOnly should be" |
| + + " composited"); |
| + }); |
| + t.done(); |
|
alancutter (OOO until 2018)
2016/10/28 03:38:32
Nit: If you use promise_test() you can avoid the t
|
| + }); |
| +}, "Using KeyframeEffect or KeyframeEffectReadOnly should not change whether an" |
| + + " animation is composited"); |
| + |
| +</script> |
| +</body> |