Skip to content

Commit

Permalink
[css-properties-values-api] Test substitution of em units into '*' pr…
Browse files Browse the repository at this point in the history
…ops.

This didn't work correctly until the recent improvements to the
property application order.

BUG=641877

Change-Id: I3f7a90eeb0c027d305b470372db8759c34d14390
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1525933
Auto-Submit: Anders Hartvoll Ruud <[email protected]>
Reviewed-by: Rune Lillesveen <[email protected]>
Commit-Queue: Rune Lillesveen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#645751}
  • Loading branch information
andruud authored and chromium-wpt-export-bot committed Mar 29, 2019
1 parent 3ad4a3b commit c5bd0d1
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@
element.style = '';
}, 'Lists with relative units are absolutized when substituting');

test(function(){
let length = generate_property('none | <length>');
let universal = generate_property('*');
element.style = `font-size: 10px; ${length}: 10em; ${universal}: var(${length})`;
let computedStyle = getComputedStyle(element);
assert_equals(computedStyle.getPropertyValue(universal), ' 100px');
element.style = '';
}, 'Values are absolutized when substituting into properties with universal syntax');

function test_valid_fallback(syntax, value, fallback) {
test(function(){
let name = generate_property(syntax);
Expand Down

0 comments on commit c5bd0d1

Please sign in to comment.