[CSS Blending] Remove support for non-separable blend modes from mix-blend-mode
[WebKit-https.git] / LayoutTests / css3 / compositing / script-tests / blend-mode-property.js
1 description("Test the parsing of the mix-blend-mode property.");
2
3 var styleElement = document.createElement("style");
4 document.head.appendChild(styleElement);
5 var stylesheet = styleElement.sheet;
6 var cssRule;
7 var declaration;
8
9 function testblendmode(blendmode)
10 {
11 // add a -webkit-filter property to the start of the stylesheet
12 stylesheet.addRule("body", "mix-blend-mode: " + blendmode, 0);
13
14 cssRule = stylesheet.cssRules.item(0);
15
16 shouldBe("cssRule.type", "1");
17
18 declaration = cssRule.style;
19 shouldBe("declaration.length", "1");
20 shouldBe("declaration.getPropertyValue('mix-blend-mode')", "\'" + blendmode + "\'");
21 }
22
23 var blendmodes = ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion"];
24
25 for(x in blendmodes)
26    testblendmode(blendmodes[x]);
27
28 successfullyParsed = true;