Update web-platform-tests to revision 912d5081b62d6e6a2f847935c82722e31cca7a1f

This commit is contained in:
WPT Sync Bot 2018-12-10 21:07:47 -05:00
parent eeaca0b26d
commit a44e48301c
75 changed files with 1894 additions and 292 deletions

View file

@ -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>