Skip to content

Commit 0d569c2

Browse files
authored
Rewrite property-cascade.html with getComputedStyle() (#42623)
Fixes web-platform-tests/interop#588
1 parent 3375400 commit 0d569c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

css/css-properties-values-api/property-cascade.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
test(function(){
2525
// Because var(--my-color) is invalid, our color declaration should behave
2626
// like color:unset, i.e. it should compute to the inherited color.
27-
assert_equals(inner.computedStyleMap().get('color').toString(), 'rgb(1, 1, 1)');
27+
assert_equals(getComputedStyle(inner).color, 'rgb(1, 1, 1)');
2828

2929
CSS.registerProperty({
3030
name: '--my-color',
@@ -36,7 +36,7 @@
3636
// After registering, var(--my-color) is still invalid. The important thing
3737
// here is that the computed value of color is the initialValue of
3838
// --my-color, and not rgb(2, 2, 2).
39-
assert_equals(inner.computedStyleMap().get('color').toString(), 'rgb(3, 3, 3)');
39+
assert_equals(getComputedStyle(inner).color, 'rgb(3, 3, 3)');
4040
}, 'Registering a property does not affect cascade');
4141

4242
test(function(){
@@ -56,7 +56,7 @@
5656

5757
outer.appendChild(element);
5858

59-
assert_equals(element.computedStyleMap().get('color').toString(), 'rgb(4, 4, 4)');
59+
assert_equals(getComputedStyle(element).color, 'rgb(4, 4, 4)');
6060
}, 'Registering a property does not affect parsing');
6161

6262

0 commit comments

Comments
 (0)