blob: e3e6a5868e06883e4560a441de93e4f385845f24 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description("Test the parsing of the mix-blend-mode property.");
// These have to be global for the test helpers to see them.
var stylesheet, cssRule, declaration;
var styleElement = document.createElement("style");
document.head.appendChild(styleElement);
stylesheet = styleElement.sheet;
stylesheet.insertRule("body { mix-blend-mode: multiply; }", 0);
function testInvalidFilterRule(description, rule)
{
debug("");
debug(description + " : " + rule);
stylesheet.insertRule("body { mix-blend-mode: " + rule + "; }", 0);
cssRule = stylesheet.cssRules.item(0);
shouldBe("cssRule.type", "1");
declaration = cssRule.style;
shouldBe("declaration.length", "0");
shouldBeEqualToString("declaration.getPropertyValue('mix-blend-mode')", "");
}
testInvalidFilterRule("Too many parameters", "overlay overlay");
testInvalidFilterRule("Wrong type", "\"5px\"");
testInvalidFilterRule("Trailing comma", "overlay,");
successfullyParsed = true;
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>