Bug 1541657 [wpt PR 15904] - [css-properties-values-api] Test substitution of em units into '*' props., a=testonly
authorAnders Hartvoll Ruud <andruud@chromium.org>
Thu, 18 Apr 2019 11:58:55 +0000
changeset 529979 d5d0610ad4998e8e6d3bfc40618b1ff9cac03774
parent 529978 5e286877f6bd5c969ed2bdd76763d5a76ea67efe
child 529980 375f67a38d8805d873047cba17229603241bfd79
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1541657, 15904, 641877, 1525933, 645751
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1541657 [wpt PR 15904] - [css-properties-values-api] Test substitution of em units into '*' props., a=testonly Automatic update from web-platform-tests [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 <andruud@chromium.org> Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#645751} -- wpt-commits: c5bd0d1a46aaf853bf17f16f5059f8be07ec7f20 wpt-pr: 15904
testing/web-platform/tests/css/css-properties-values-api/var-reference-registered-properties.html
--- a/testing/web-platform/tests/css/css-properties-values-api/var-reference-registered-properties.html
+++ b/testing/web-platform/tests/css/css-properties-values-api/var-reference-registered-properties.html
@@ -131,16 +131,25 @@ test(function(){
         inherits: false
     });
     element.style = 'font-size: 11px; --length-calc-list: 10em, calc(10em + 10px); --unregistered:var(--length-calc-list);';
     let computedStyle = getComputedStyle(element);
     assert_equals(computedStyle.getPropertyValue('--unregistered'), '110px, 120px');
     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);
         try {
             element.style = `${name}: ${value}; --x:var(${name},${fallback})`;
             let computedStyle = getComputedStyle(element);
             assert_equals(computedStyle.getPropertyValue('--x'), value);
         } finally {