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

Side by Side Diff: third_party/WebKit/LayoutTests/animations/svg-composition-ignores-css-composition-flag.html

Issue 2975793004: Move animation svg tests to own subdirectory (Closed)
Patch Set: Created 3 years, 5 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
(Empty)
1 <script src="../resources/testharness.js"></script>
2 <script src="../resources/testharnessreport.js"></script>
3
4 <div id="cssTarget"></div>
5 <svg>
6 <rect id="svgTarget" color="red"></rect>
7 </svg>
8
9 <script>
10 internals.disableCSSAdditiveAnimations();
11
12 test(() => {
13 assert_throws('NotSupportedError', () => {
14 cssTarget.animate({color: 'red'});
15 });
16 assert_throws('NotSupportedError', () => {
17 cssTarget.animate([
18 {color: 'red'},
19 {color: 'red', composite: 'add'},
20 ]);
21 });
22 }, 'Precheck that disabling CSS additive animations works.');
23
24 test(() => {
25 var animation = svgTarget.animate({'svg-color': 'green'}, 1);
26 animation.pause();
27 animation.currentTime = 0.5;
28 assert_equals(getComputedStyle(svgTarget).color, 'rgb(128, 64, 0)');
29 animation.cancel();
30 }, 'Neutral keyframes supported for SVG presentation attributes.');
31
32 test(() => {
33 var keyframe = {'svg-color': 'green', composite: 'add'};
34 var animation = svgTarget.animate([keyframe, keyframe], {fill: 'forwards'});
35 assert_equals(getComputedStyle(svgTarget).color, 'rgb(255, 128, 0)');
36 animation.cancel();
37 }, 'Additive keyframes supported for SVG presentation attributes.');
38 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698