blob: 3733bbcb8d5b81113a1168e00744c5f4282e3045 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
@supports (border: black) and (padding: 0) and (width: 0) {
dfn { width:0; }
}
</style>
</head>
<body>
<script src="../../resources/js-test-pre.js"></script>
<script>
description("Tests that the parameters to CSSSupportsRule.insertRule() / deleteRule() are mandatory.");
var supportsRule = document.styleSheets[0].cssRules[0];
shouldBe("supportsRule.__proto__", "CSSSupportsRule.prototype");
shouldThrow("supportsRule.insertRule()", "'TypeError: Not enough arguments'");
shouldBe("supportsRule.cssRules.length", "1");
shouldNotThrow("supportsRule.insertRule('body { width: 0; }')");
shouldBe("supportsRule.cssRules.length", "2");
shouldThrow("supportsRule.deleteRule()", "'TypeError: Not enough arguments'");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>