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..db97975ca97f7013e3bfe50f21be13f671104b60 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/virtual/threaded/animations/KeyframeEffectReadOnly-composited-animation.html |
@@ -0,0 +1,33 @@ |
+<!DOCTYPE html> |
+<meta charset=utf-8> |
+<title>Animating with KeyframeEffectReadOnly objects</title> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+<body> |
+<div id="target"></div> |
+<div id="targetRO"></div> |
+<script> |
+"use strict"; |
+ |
+promise_test(function(t) { |
+ var effect = new KeyframeEffect(target, { opacity: [0, 0.9] }, 1000); |
+ var anim = target.animate(null); |
+ anim.effect = effect; |
+ |
+ var effectRO = new KeyframeEffectReadOnly( |
+ targetRO, { opacity: [0, 0.9] }, 1000); |
+ var animRO = targetRO.animate(null); |
+ animRO.effect = effectRO; |
+ |
+ return Promise.all([anim.ready, animRO.ready]).then(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"); |
+ }); |
+}, "Using KeyframeEffect or KeyframeEffectReadOnly should not change whether an" |
+ + " animation is composited"); |
+ |
+</script> |
+</body> |