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

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

Issue 2398373002: Construct KeyframeEffectReadOnly objects (Closed)
Patch Set: Minor fixes: remove TODO, fix include Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset=utf-8>
3 <title>Animating with KeyframeEffectReadOnly objects</title>
4 <script src="../../../resources/testharness.js"></script>
5 <script src="../../../resources/testharnessreport.js"></script>
6 <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
7 <body>
8 <script>
9 "use strict";
10
11 async_test(function(t) {
12 var target = createDiv(t);
13 var effect = new KeyframeEffect(target, { opacity: [0, 0.9] }, 1000);
14 var anim = target.animate(null);
15 anim.effect = effect;
16
17 var targetRO = createDiv(t);
18 var effectRO = new KeyframeEffectReadOnly(
19 targetRO, { opacity: [0, 0.9] }, 1000);
20 var animRO = targetRO.animate(null);
21 animRO.effect = effectRO;
22
23 Promise.all([anim.ready, animRO.ready]).then(function() {
24 t.step(function() {
25 assert_true(internals.isCompositedAnimation(anim),
26 "Opacity animation with KeyframeEffect should be composited");
27 assert_true(internals.isCompositedAnimation(animRO),
28 "Opacity animation with KeyframeEffectReadOnly should be"
29 + " composited");
30 });
31 t.done();
alancutter (OOO until 2018) 2016/10/28 03:38:32 Nit: If you use promise_test() you can avoid the t
32 });
33 }, "Using KeyframeEffect or KeyframeEffectReadOnly should not change whether an"
34 + " animation is composited");
35
36 </script>
37 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698