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

Side by Side Diff: third_party/WebKit/LayoutTests/animations/big-number-clamping.html

Issue 1457623003: Clamp animated numbers according to ComputedStyle data type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: var Created 5 years, 1 month 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/NumberPropertyFunctions.cpp » ('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 div {
6 /* This is required so that z-index doesn't compute as auto. */
7 position: relative;
8 }
9 </style>
10
11 <div id="animated"></div>
12 <div id="reference"></div>
13
14 <script>
15 var numberProperties = [
dstockwell 2015/11/18 23:52:00 I wonder if there's a way to test all properties.
alancutter (OOO until 2018) 2015/11/19 00:10:07 CSSOM2 would be good for this case.
16 'flex-grow',
17 'flex-shrink',
18 'font-size-adjust',
19 'line-height',
20 'orphans',
21 'stroke-miterlimit',
22 'widows',
23 'z-index',
24 ];
25
26 var bigNumber = 1e20;
27
28 for (var property of numberProperties) {
29 test(() => {
30 animated.animate({[property]: bigNumber}, {fill: 'forwards'});
31 reference.style[property] = bigNumber;
32 assert_equals(getComputedStyle(animated)[property], getComputedStyle(referen ce)[property]);
33 }, `Animations on ${property} should clamp identically to setting inline style `);
34 }
35 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/NumberPropertyFunctions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698