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

Side by Side Diff: third_party/WebKit/LayoutTests/animations/use-count-SyntheticKeyframesInCompositedCSSAnimation.html

Issue 2620303002: Refactor how UseCounter::SyntheticKeyframesInCompositedCSSAnimation is counted (Closed)
Patch Set: g cl set-commit Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/Keyframe.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <style>
5 @keyframes noSyntheticKeyframes {
6 from { color: black; }
7 to { color: green; }
8 }
9 @keyframes customPropertySyntheticKeyframes {
10 to { --x: pants; }
11 }
12 @keyframes nonCompositedSyntheticKeyframes {
13 to { color: green; }
14 }
15 @keyframes compositedSyntheticKeyframes {
16 from {
17 opacity: 0;
18 }
19 to {
20 transform: rotate(45deg);
21 opacity: 1;
22 }
23 }
24 #target {
25 animation-duration: 1s;
26 }
27 </style>
28 <div id="target"></div>
29 <script>
30 // From UseCounter.h.
31 var SyntheticKeyframesInCompositedCSSAnimation = 664;
32
33 function forceStyleRecalc() {
34 getComputedStyle(target).left;
35 }
36
37 test(() => {
38 forceStyleRecalc();
39 assert_false(internals.isUseCounted(document, SyntheticKeyframesInCompositedCS SAnimation), 'No animations started');
40
41 target.style.animationName = 'noSyntheticKeyframes';
42 forceStyleRecalc();
43 assert_false(internals.isUseCounted(document, SyntheticKeyframesInCompositedCS SAnimation), 'noSyntheticKeyframes');
44
45 target.style.animationName = 'customPropertySyntheticKeyframes';
46 forceStyleRecalc();
47 assert_false(internals.isUseCounted(document, SyntheticKeyframesInCompositedCS SAnimation), 'customPropertySyntheticKeyframes');
48
49 target.style.animationName = 'nonCompositedSyntheticKeyframes';
50 forceStyleRecalc();
51 assert_false(internals.isUseCounted(document, SyntheticKeyframesInCompositedCS SAnimation), 'nonCompositedSyntheticKeyframes');
52
53 target.style.animationName = 'compositedSyntheticKeyframes';
54 forceStyleRecalc();
55 assert_true(internals.isUseCounted(document, SyntheticKeyframesInCompositedCSS Animation), 'compositedSyntheticKeyframes');
56 }, 'The SyntheticKeyframesInCompositedCSSAnimation use counter should only be tr iggered by animations with composited properties with neutral keyframes');
57 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/Keyframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698