1 description("Test the parsing of the background-blend-mode property.");
3 var styleElement
= document
.createElement("style");
4 document
.head
.appendChild(styleElement
);
5 var stylesheet
= styleElement
.sheet
;
9 function testblendmode(blendmode
)
11 // add a -webkit-filter property to the start of the stylesheet
12 stylesheet
.addRule("body", "background-blend-mode: " + blendmode
+ ", " + blendmode
, 0);
14 cssRule
= stylesheet
.cssRules
.item(0);
16 shouldBe("cssRule.type", "1");
18 declaration
= cssRule
.style
;
19 shouldBe("declaration.length", "1");
20 shouldBe("declaration.getPropertyValue('background-blend-mode')", "\'" + blendmode
+ ", " + blendmode
+ "\'");
23 var blendmodes
= ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
26 testblendmode(blendmodes
[x
]);
28 successfullyParsed
= true;