mirror of
https://github.com/servo/servo.git
synced 2025-09-08 14:08:22 +01:00
Update web-platform-tests to revision 912d5081b62d6e6a2f847935c82722e31cca7a1f
This commit is contained in:
parent
eeaca0b26d
commit
a44e48301c
75 changed files with 1894 additions and 292 deletions
|
@ -19,24 +19,22 @@
|
|||
<div id="log"></div>
|
||||
<script type="text/javascript">
|
||||
var sheet = document.getElementById("styleElement").sheet;
|
||||
// Initial rule list is of size 1
|
||||
// Can add a rule at first index
|
||||
test(function() {
|
||||
assert_equals(sheet.cssRules.length, 1);
|
||||
sheet.insertRule("p { color: green; }", 0);
|
||||
assert_equals(sheet.cssRules.length, 2);
|
||||
assert_equals(sheet.cssRules.item(0).cssText, "p { color: green; }");
|
||||
}, "add_rule", {
|
||||
assert: [ "Initial rule list is of size 1",
|
||||
"Can add a rule at first index" ]
|
||||
});
|
||||
}, "add_rule");
|
||||
|
||||
// Can delete rules until rule list is empty
|
||||
test(function() {
|
||||
sheet.deleteRule(0);
|
||||
assert_equals(sheet.cssRules.length, 1);
|
||||
sheet.deleteRule(0);
|
||||
assert_equals(sheet.cssRules.length, 0);
|
||||
}, "delete_rule", {
|
||||
assert: "Can delete rules until rule list is empty"
|
||||
});
|
||||
}, "delete_rule");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue