From 0d569c25cc1d7265e8eb92ead6049600edef4a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?= Date: Fri, 20 Oct 2023 16:36:47 +0200 Subject: [PATCH] Rewrite property-cascade.html with getComputedStyle() (#42623) Fixes https://github.com/web-platform-tests/interop/issues/588 --- css/css-properties-values-api/property-cascade.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/css/css-properties-values-api/property-cascade.html b/css/css-properties-values-api/property-cascade.html index bb50213d5ce171..68417a578ac131 100644 --- a/css/css-properties-values-api/property-cascade.html +++ b/css/css-properties-values-api/property-cascade.html @@ -24,7 +24,7 @@ test(function(){ // Because var(--my-color) is invalid, our color declaration should behave // like color:unset, i.e. it should compute to the inherited color. - assert_equals(inner.computedStyleMap().get('color').toString(), 'rgb(1, 1, 1)'); + assert_equals(getComputedStyle(inner).color, 'rgb(1, 1, 1)'); CSS.registerProperty({ name: '--my-color', @@ -36,7 +36,7 @@ // After registering, var(--my-color) is still invalid. The important thing // here is that the computed value of color is the initialValue of // --my-color, and not rgb(2, 2, 2). - assert_equals(inner.computedStyleMap().get('color').toString(), 'rgb(3, 3, 3)'); + assert_equals(getComputedStyle(inner).color, 'rgb(3, 3, 3)'); }, 'Registering a property does not affect cascade'); test(function(){ @@ -56,7 +56,7 @@ outer.appendChild(element); - assert_equals(element.computedStyleMap().get('color').toString(), 'rgb(4, 4, 4)'); + assert_equals(getComputedStyle(element).color, 'rgb(4, 4, 4)'); }, 'Registering a property does not affect parsing');