Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / css3 / blending / script-tests / blend-mode-property.js
blob5ac0d92a9aa2b6ee6d91c160cfc0e30b803dc514
1 description("Test the parsing of the mix-blend-mode property.");
3 var styleElement = document.createElement("style");
4 document.head.appendChild(styleElement);
5 var stylesheet = styleElement.sheet;
6 var cssRule;
7 var declaration;
9 function testblendmode(blendmode)
11 // add a -webkit-filter property to the start of the stylesheet
12 stylesheet.addRule("body", "mix-blend-mode: " + 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('mix-blend-mode')", "\'" + blendmode + "\'");
23 var blendmodes = ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
25 for(x in blendmodes)
26    testblendmode(blendmodes[x]);
28 successfullyParsed = true;