| Index: third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html
|
| diff --git a/third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html b/third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html
|
| index 897550f63c9ae144af35fcfa267f9f3195b27b98..d8603855fe14adf66ac2994d516e54be3c88544a 100644
|
| --- a/third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html
|
| +++ b/third_party/WebKit/LayoutTests/custom-properties/registered-property-computation.html
|
| @@ -21,11 +21,16 @@
|
| --list-3: 3% 10vmax 22px;
|
| --list-4: calc(50% + 1em) 4px;
|
| }
|
| +#fontSizeCycle {
|
| + --font-size: 2em;
|
| + font-size: var(--font-size);
|
| +}
|
| </style>
|
|
|
| <div id=divWithFontSizeSet></div>
|
| <div id=parentDiv>
|
| <div id=divWithFontSizeInherited></div>
|
| + <div id=fontSizeCycle></div>
|
| </div>
|
|
|
| <script>
|
| @@ -42,6 +47,7 @@ CSS.registerProperty({name: '--list-1', syntax: '<length>+', initialValue: '0px'
|
| CSS.registerProperty({name: '--list-2', syntax: '<length>+', initialValue: '0px'});
|
| CSS.registerProperty({name: '--list-3', syntax: '<length-percentage>+', initialValue: '0px'});
|
| CSS.registerProperty({name: '--list-4', syntax: '<length-percentage>+', initialValue: '0px'});
|
| +CSS.registerProperty({name: '--font-size', syntax: '<length>', initialValue: '0px'});
|
|
|
| for (var element of [divWithFontSizeSet, divWithFontSizeInherited]) {
|
| var id = element.id;
|
| @@ -72,4 +78,10 @@ for (var element of [divWithFontSizeSet, divWithFontSizeInherited]) {
|
| assert_equals(computedStyle.getPropertyValue('--list-4'), 'calc(10px + 50%) 4px');
|
| }, "<length-percentage>+ values are computed correctly for " + id);
|
| }
|
| +
|
| +test(function() {
|
| + var computedStyle = getComputedStyle(fontSizeCycle);
|
| + assert_equals(computedStyle.fontSize, '20px');
|
| + assert_equals(computedStyle.getPropertyValue('--font-size'), '40px');
|
| +}, "font-size with a var() reference to a registered property using ems works as expected");
|
| </script>
|
|
|