Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(937)

Side by Side Diff: LayoutTests/css3/blending/script-tests/blend-mode-property-parsing-invalid.js

Issue 1274643002: CSSStyleDeclaraction returns empty string (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed changes from imported/csswg-test Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 description("Test the parsing of the mix-blend-mode property."); 1 description("Test the parsing of the mix-blend-mode property.");
2 2
3 // These have to be global for the test helpers to see them. 3 // These have to be global for the test helpers to see them.
4 var stylesheet, cssRule, declaration; 4 var stylesheet, cssRule, declaration;
5 var styleElement = document.createElement("style"); 5 var styleElement = document.createElement("style");
6 document.head.appendChild(styleElement); 6 document.head.appendChild(styleElement);
7 stylesheet = styleElement.sheet; 7 stylesheet = styleElement.sheet;
8 stylesheet.insertRule("body { mix-blend-mode: multiply; }", 0); 8 stylesheet.insertRule("body { mix-blend-mode: multiply; }", 0);
9 9
10 function testInvalidFilterRule(description, rule) 10 function testInvalidFilterRule(description, rule)
11 { 11 {
12 debug(""); 12 debug("");
13 debug(description + " : " + rule); 13 debug(description + " : " + rule);
14 14
15 stylesheet.insertRule("body { mix-blend-mode: " + rule + "; }", 0); 15 stylesheet.insertRule("body { mix-blend-mode: " + rule + "; }", 0);
16 cssRule = stylesheet.cssRules.item(0); 16 cssRule = stylesheet.cssRules.item(0);
17 17
18 shouldBe("cssRule.type", "1"); 18 shouldBe("cssRule.type", "1");
19 19
20 declaration = cssRule.style; 20 declaration = cssRule.style;
21 shouldBe("declaration.length", "0"); 21 shouldBe("declaration.length", "0");
22 shouldBe("declaration.getPropertyValue('mix-blend-mode')", "null"); 22 shouldBeEqualToString("declaration.getPropertyValue('mix-blend-mode')", "");
23 } 23 }
24 24
25 testInvalidFilterRule("Too many parameters", "overlay overlay"); 25 testInvalidFilterRule("Too many parameters", "overlay overlay");
26 testInvalidFilterRule("Wrong type", "\"5px\""); 26 testInvalidFilterRule("Wrong type", "\"5px\"");
27 testInvalidFilterRule("Trailing comma", "overlay,"); 27 testInvalidFilterRule("Trailing comma", "overlay,");
28 28
29 29
30 successfullyParsed = true; 30 successfullyParsed = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698