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

Side by Side Diff: third_party/WebKit/LayoutTests/animations/custom-properties/unregistered-element-animate.html

Issue 2532953008: Apply custom property animations (Closed)
Patch Set: Make animatedElement usage consistent Created 4 years 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 <style>
4 #target {
5 background-color: var(--x);
6 }
7 </style>
8 <div id="target"></div>
9 <script>
10 test(() => {
11 var animation = target.animate({'--x': ['green', 'lime']}, 1000);
12 animation.currentTime = 250;
13 assert_equals(getComputedStyle(target).getPropertyValue('--x'), 'green');
14 assert_equals(getComputedStyle(target).backgroundColor, 'rgb(0, 128, 0)');
15 animation.currentTime = 750;
16 assert_equals(getComputedStyle(target).getPropertyValue('--x'), 'lime');
17 assert_equals(getComputedStyle(target).backgroundColor, 'rgb(0, 255, 0)');
18 }, 'element.animate() animations should apply custom properties');
19 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698