Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: third_party/WebKit/LayoutTests/virtual/threaded/animations/KeyframeEffectReadOnly-composited-animation.html

Issue 2398373002: Construct KeyframeEffectReadOnly objects (Closed)
Patch Set: Test tweaks in response to review Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698