mirror of
https://github.com/servo/servo.git
synced 2025-06-24 00:54:32 +01:00
Add WPT test for CSSStyleRule.style property
This commit is contained in:
parent
4738ce1af5
commit
aa99f18806
4 changed files with 30 additions and 8 deletions
|
@ -1,5 +0,0 @@
|
|||
[cssstyledeclaration-mutability.htm]
|
||||
type: testharness
|
||||
[StyleSheet's CSSStyleDeclaration is mutable]
|
||||
expected: FAIL
|
||||
|
|
@ -123,9 +123,6 @@
|
|||
[CSSStyleRule interface: style_element.sheet.cssRules[0\] must inherit property "selectorText" with the proper type (0)]
|
||||
expected: FAIL
|
||||
|
||||
[CSSStyleRule interface: style_element.sheet.cssRules[0\] must inherit property "style" with the proper type (1)]
|
||||
expected: FAIL
|
||||
|
||||
[CSSRule interface: style_element.sheet.cssRules[0\] must inherit property "parentRule" with the proper type (10)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -39695,6 +39695,12 @@
|
|||
"url": "/cssom/CSSRuleList.html"
|
||||
}
|
||||
],
|
||||
"cssom/CSSStyleRule.html": [
|
||||
{
|
||||
"path": "cssom/CSSStyleRule.html",
|
||||
"url": "/cssom/CSSStyleRule.html"
|
||||
}
|
||||
],
|
||||
"cssom/CSSStyleSheet.html": [
|
||||
{
|
||||
"path": "cssom/CSSStyleSheet.html",
|
||||
|
|
24
tests/wpt/web-platform-tests/cssom/CSSStyleRule.html
Normal file
24
tests/wpt/web-platform-tests/cssom/CSSStyleRule.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style type="text/css" id="styleElement">
|
||||
div { margin: 10px; padding: 0px; }
|
||||
</style>
|
||||
<script>
|
||||
var styleSheet = document.getElementById("styleElement").sheet;
|
||||
var rule = styleSheet.cssRules[0];
|
||||
|
||||
test(function() {
|
||||
assert_equals(typeof rule.style, "object");
|
||||
assert_equals(rule.style.margin, "10px");
|
||||
assert_equals(rule.style.padding, "0px");
|
||||
|
||||
rule.style.padding = "5px";
|
||||
rule.style.border = "1px solid";
|
||||
|
||||
assert_equals(rule.style.padding, "5px");
|
||||
assert_equals(rule.style.border, "1px solid");
|
||||
}, "CSSStyleRule: style property");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue