diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index a235abdc2e5..a28405e1c1a 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -553764,7 +553764,7 @@ "testharness" ], "cssom/CSSStyleRule.html": [ - "b7cfe3da8454d5c64a25c440e0776c80d8c3a751", + "83a876458ba609b81c86354160549ab11b018d38", "testharness" ], "cssom/CSSStyleSheet.html": [ diff --git a/tests/wpt/metadata/cssom/CSSStyleRule.html.ini b/tests/wpt/metadata/cssom/CSSStyleRule.html.ini index a859aec7a83..4b0ba813427 100644 --- a/tests/wpt/metadata/cssom/CSSStyleRule.html.ini +++ b/tests/wpt/metadata/cssom/CSSStyleRule.html.ini @@ -9,9 +9,9 @@ [Values of CSSRule attributes] expected: FAIL - [Existence, writability and type of CSSStyleRule attributes] - expected: FAIL - [Values of CSSStyleRule attributes] expected: FAIL + [Existence and type of CSSStyleRule attributes] + expected: FAIL + diff --git a/tests/wpt/web-platform-tests/cssom/CSSStyleRule.html b/tests/wpt/web-platform-tests/cssom/CSSStyleRule.html index 65d6d534046..626301a9fb0 100644 --- a/tests/wpt/web-platform-tests/cssom/CSSStyleRule.html +++ b/tests/wpt/web-platform-tests/cssom/CSSStyleRule.html @@ -67,8 +67,24 @@ assert_idl_attribute(rule, "selectorText"); assert_equals(typeof rule.selectorText, "string"); assert_idl_attribute(rule, "style"); - assert_readonly(rule, "style"); - }, "Existence, writability and type of CSSStyleRule attributes"); + }, "Existence and type of CSSStyleRule attributes"); + + test(function() { + // CSSStyleRule.style has PutForwards=cssText and SameObject. + var initial = rule.style.cssText; + var style = rule.style; + + rule.style = ""; + assert_equals(rule.style.cssText, ""); + assert_equals(rule.style, style); + + rule.style = "margin: 42px;"; + assert_equals(rule.style.margin, "42px"); + assert_equals(rule.style, style); + + rule.style = initial; + assert_equals(rule.style, style); + }, "Assigning to CSSStyleRule.style assigns to cssText; CSSStyleRule.style returns the same object"); test(function() { assert_equals(rule.selectorText, "div");