1 description("Test the parsing of the mix-blend-mode property.");
3 // These have to be global for the test helpers to see them.
4 var stylesheet, cssRule, declaration;
5 var styleElement = document.createElement("style");
6 document.head.appendChild(styleElement);
7 stylesheet = styleElement.sheet;
8 stylesheet.insertRule("body { mix-blend-mode: multiply; }", 0);
10 function testInvalidFilterRule(description, rule)
13 debug(description + " : " + rule);
15 stylesheet.insertRule("body { mix-blend-mode: " + rule + "; }", 0);
16 cssRule = stylesheet.cssRules.item(0);
18 shouldBe("cssRule.type", "1");
20 declaration = cssRule.style;
21 shouldBe("declaration.length", "0");
22 shouldBeEqualToString("declaration.getPropertyValue('mix-blend-mode')", "");
25 testInvalidFilterRule("Too many parameters", "overlay overlay");
26 testInvalidFilterRule("Wrong type", "\"5px\"");
27 testInvalidFilterRule("Trailing comma", "overlay,");
30 successfullyParsed = true;