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

Side by Side Diff: third_party/WebKit/LayoutTests/css3/calc/number-parsing.html

Issue 2052883002: Clamp filter functions {grayscale, invert, opacity, sepia} to 100% (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@filter-js-tests
Patch Set: Additional test fixup Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/css3/filters/filter-property-parsing.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script> 4 <script>
5 function assertParsedValue(property, input, expected) { 5 function assertParsedValue(property, input, expected) {
6 var style = document.createElement('div').style; 6 var style = document.createElement('div').style;
7 style.setProperty(property, input); 7 style.setProperty(property, input);
8 assert_equals(style.getPropertyValue(property), expected, property + ': ' + in put); 8 assert_equals(style.getPropertyValue(property), expected, property + ': ' + in put);
9 } 9 }
10 10
11 test(function() { 11 test(function() {
12 assertParsedValue('-webkit-box-ordinal-group', 'calc(6 + 4)', '10'); 12 assertParsedValue('-webkit-box-ordinal-group', 'calc(6 + 4)', '10');
13 assertParsedValue('-webkit-box-ordinal-group', 'calc(0)', ''); 13 assertParsedValue('-webkit-box-ordinal-group', 'calc(0)', '');
14 assertParsedValue('-webkit-column-span', 'calc(2 - 1)', ''); 14 assertParsedValue('-webkit-column-span', 'calc(2 - 1)', '');
15 assertParsedValue('-webkit-column-span', 'calc(1 + 2)', ''); 15 assertParsedValue('-webkit-column-span', 'calc(1 + 2)', '');
16 assertParsedValue('-webkit-column-width', 'calc(1em - 1px)', 'calc(1em - 1px)' ); 16 assertParsedValue('-webkit-column-width', 'calc(1em - 1px)', 'calc(1em - 1px)' );
17 assertParsedValue('transition-timing-function', 'cubic-bezier(calc(1 + 2), 0, 1, 1)', ''); 17 assertParsedValue('transition-timing-function', 'cubic-bezier(calc(1 + 2), 0, 1, 1)', '');
18 assertParsedValue('transition-timing-function', 'cubic-bezier(calc(1 / 2), cal c(1 - 1), calc(2 - 1), calc(2 * 3))', 'cubic-bezier(0.5, 0, 1, 6)'); 18 assertParsedValue('transition-timing-function', 'cubic-bezier(calc(1 / 2), cal c(1 - 1), calc(2 - 1), calc(2 * 3))', 'cubic-bezier(0.5, 0, 1, 6)');
19 assertParsedValue('transition-timing-function', 'steps(calc(1 + 2), start)', ' steps(3, start)'); 19 assertParsedValue('transition-timing-function', 'steps(calc(1 + 2), start)', ' steps(3, start)');
20 assertParsedValue('grid-row-start', 'calc(1 + 2) test', '3 test'); 20 assertParsedValue('grid-row-start', 'calc(1 + 2) test', '3 test');
21 assertParsedValue('grid-row-start', 'calc(1 / 2) test', ''); 21 assertParsedValue('grid-row-start', 'calc(1 / 2) test', '');
22 assertParsedValue('font-weight', 'calc(100 + 200)', ''); 22 assertParsedValue('font-weight', 'calc(100 + 200)', '');
23 assertParsedValue('flex', 'calc(1 + 2) calc(3 + 4)', '3 7 0%'); 23 assertParsedValue('flex', 'calc(1 + 2) calc(3 + 4)', '3 7 0%');
24 assertParsedValue('-webkit-filter', 'saturate(calc(4 / 2))', 'saturate(2)'); 24 assertParsedValue('-webkit-filter', 'saturate(calc(4 / 2))', 'saturate(2)');
25 assertParsedValue('-webkit-filter', 'invert(calc(4 / 2))', ''); 25 assertParsedValue('-webkit-filter', 'invert(calc(4 / 2))', 'invert(1)');
26 assertParsedValue('-webkit-filter', 'invert(calc(2 / 4))', 'invert(0.5)'); 26 assertParsedValue('-webkit-filter', 'invert(calc(2 / 4))', 'invert(0.5)');
27 assertParsedValue('-webkit-filter', 'brightness(calc(4 / 2))', 'brightness(2)' ); 27 assertParsedValue('-webkit-filter', 'brightness(calc(4 / 2))', 'brightness(2)' );
28 }, 'Ensure using calc() for CSS numbers does not crash or produce incorrect valu es.'); 28 }, 'Ensure using calc() for CSS numbers does not crash or produce incorrect valu es.');
29 </script> 29 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/css3/filters/filter-property-parsing.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698