Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add WPT test for CSSStyleRule.style property
- Loading branch information
Showing
4 changed files
with
30 additions
and
8 deletions.
There are no files selected for viewing
5 changes: 0 additions & 5 deletions
5
tests/wpt/metadata-css/cssom-1_dev/html/cssstyledeclaration-mutability.htm.ini
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |