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

Side by Side Diff: third_party/WebKit/LayoutTests/animations/custom-properties/registered-var-to-registered-any-order.html

Issue 2809063002: WIP Support var() references in registered custom property keyframes (Closed)
Patch Set: Rebased Created 3 years, 6 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 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <div id="target"></div>
5 <script>
6 for (let name of ['--a', '--b']) {
7 CSS.registerProperty({
8 name,
9 syntax: '<number>',
10 initialValue: '0',
11 });
12 }
13
14 test(() => {
15 let a = target.animate({'--a': ['100', 'var(--b)']}, 100);
16 let b = target.animate({'--b': ['200', '200']}, 100);
17
18 a.currentTime = 50;
19 assert_equals(getComputedStyle(target).getPropertyValue('--a'), '150', '--a an imating towards --b');
20 assert_equals(getComputedStyle(target).getPropertyValue('--b'), '200', '--b st ationary at 200');
21
22 a.cancel();
23 b.cancel();
24
25 a = target.animate({'--a': ['200', '200']}, 100);
26 b = target.animate({'--b': ['100', 'var(--a)']}, 100);
27
28 b.currentTime = 50;
29 assert_equals(getComputedStyle(target).getPropertyValue('--a'), '200', '--a st ationary at 200');
30 assert_equals(getComputedStyle(target).getPropertyValue('--b'), '150', '--b an imating towards --a');
31 }, 'Registered custom property animation keyframes with var() references should not be affected by name ordering');
32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698