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-unregistered.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 <style>
5 #target {
6 --from: 100;
7 --to: 200;
8 }
9 </style>
10 <div id="target"></div>
11 <script>
12 CSS.registerProperty({
13 name: '--test',
14 syntax: '<number>',
15 initialValue: '0',
16 });
17
18 test(() => {
19 let animation = target.animate({'--test': ['var(--from)', 'var(--to)']}, 100);
20
21 animation.currentTime = 25;
22 assert_equals(getComputedStyle(target).getPropertyValue('--test'), '125', 'tar get at 25%');
23
24 animation.currentTime = 75;
25 assert_equals(getComputedStyle(target).getPropertyValue('--test'), '175', 'tar get at 75%');
26 }, 'Registered custom property animation keyframes with var() references to unre gistered custom properties');
27 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698