|
24 | 24 | test(function(){
|
25 | 25 | // Because var(--my-color) is invalid, our color declaration should behave
|
26 | 26 | // 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)'); |
28 | 28 |
|
29 | 29 | CSS.registerProperty({
|
30 | 30 | name: '--my-color',
|
|
36 | 36 | // After registering, var(--my-color) is still invalid. The important thing
|
37 | 37 | // here is that the computed value of color is the initialValue of
|
38 | 38 | // --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)'); |
40 | 40 | }, 'Registering a property does not affect cascade');
|
41 | 41 |
|
42 | 42 | test(function(){
|
|
56 | 56 |
|
57 | 57 | outer.appendChild(element);
|
58 | 58 |
|
59 |
| - assert_equals(element.computedStyleMap().get('color').toString(), 'rgb(4, 4, 4)'); |
| 59 | + assert_equals(getComputedStyle(element).color, 'rgb(4, 4, 4)'); |
60 | 60 | }, 'Registering a property does not affect parsing');
|
61 | 61 |
|
62 | 62 |
|
|
0 commit comments