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

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

Issue 2702483002: Paint some content for animated elements in composited animation tests. (Closed)
Patch Set: Don't revise sample-on-last-keyframe.html test. Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <meta charset=utf-8> 2 <meta charset=utf-8>
3 <title>Animating with KeyframeEffectReadOnly objects</title> 3 <title>Animating with KeyframeEffectReadOnly objects</title>
4 <script src="../../../resources/testharness.js"></script> 4 <script src="../../../resources/testharness.js"></script>
5 <script src="../../../resources/testharnessreport.js"></script> 5 <script src="../../../resources/testharnessreport.js"></script>
6 <body> 6 <body>
7 <div id="target"></div> 7 <div id="target">x</div>
8 <div id="targetRO"></div> 8 <div id="targetRO">x</div>
9 <script> 9 <script>
10 "use strict"; 10 "use strict";
11 11
12 promise_test(function(t) { 12 promise_test(function(t) {
13 var effect = new KeyframeEffect(target, { opacity: [0, 0.9] }, 1000); 13 var effect = new KeyframeEffect(target, { opacity: [0, 0.9] }, 1000);
14 var anim = target.animate(null); 14 var anim = target.animate(null);
15 anim.effect = effect; 15 anim.effect = effect;
16 16
17 var effectRO = new KeyframeEffectReadOnly( 17 var effectRO = new KeyframeEffectReadOnly(
18 targetRO, { opacity: [0, 0.9] }, 1000); 18 targetRO, { opacity: [0, 0.9] }, 1000);
19 var animRO = targetRO.animate(null); 19 var animRO = targetRO.animate(null);
20 animRO.effect = effectRO; 20 animRO.effect = effectRO;
21 21
22 return Promise.all([anim.ready, animRO.ready]).then(function() { 22 return Promise.all([anim.ready, animRO.ready]).then(function() {
23 assert_true(internals.isCompositedAnimation(anim), 23 assert_true(internals.isCompositedAnimation(anim),
24 "Opacity animation with KeyframeEffect should be composited"); 24 "Opacity animation with KeyframeEffect should be composited");
25 assert_true(internals.isCompositedAnimation(animRO), 25 assert_true(internals.isCompositedAnimation(animRO),
26 "Opacity animation with KeyframeEffectReadOnly should be" 26 "Opacity animation with KeyframeEffectReadOnly should be"
27 + " composited"); 27 + " composited");
28 }); 28 });
29 }, "Using KeyframeEffect or KeyframeEffectReadOnly should not change whether an" 29 }, "Using KeyframeEffect or KeyframeEffectReadOnly should not change whether an"
30 + " animation is composited"); 30 + " animation is composited");
31 31
32 </script> 32 </script>
33 </body> 33 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698