From c5bd0d1a46aaf853bf17f16f5059f8be07ec7f20 Mon Sep 17 00:00:00 2001 From: Anders Hartvoll Ruud Date: Fri, 29 Mar 2019 06:15:21 -0700 Subject: [PATCH] [css-properties-values-api] Test substitution of em units into '*' props. 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 Reviewed-by: Rune Lillesveen Commit-Queue: Rune Lillesveen Cr-Commit-Position: refs/heads/master@{#645751} --- .../var-reference-registered-properties.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/css/css-properties-values-api/var-reference-registered-properties.html b/css/css-properties-values-api/var-reference-registered-properties.html index 166754574faa02..050b5e2cf694bc 100644 --- a/css/css-properties-values-api/var-reference-registered-properties.html +++ b/css/css-properties-values-api/var-reference-registered-properties.html @@ -136,6 +136,15 @@ element.style = ''; }, 'Lists with relative units are absolutized when substituting'); +test(function(){ + let length = generate_property('none | '); + 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);