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

Side by Side Diff: LayoutTests/css3/filters/custom-with-at-rule-syntax/script-tests/parsing-at-rule-valid.js

Issue 25607005: Fix WHITESPACE issues in the CSS grammar. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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 // Requires custom-filter-parsing-common.js. 1 // Requires custom-filter-parsing-common.js.
2 2
3 description("Test at-rule parsing for @-webkit-filter."); 3 description("Test at-rule parsing for @-webkit-filter.");
4 4
5 // These have to be global for the test helpers to see them. 5 // These have to be global for the test helpers to see them.
6 var cssRule, declaration; 6 var cssRule, declaration;
7 7
8 function testFilterAtRule(description, rule, expectedValue, expectedProperties) 8 function testFilterAtRule(description, rule, expectedValue, expectedProperties)
9 { 9 {
10 debug("\n" + description + "\n" + rule); 10 debug("\n" + description + "\n" + rule);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 testFilterAtRule("Empty rule, no extra whitespace.", 66 testFilterAtRule("Empty rule, no extra whitespace.",
67 "@-webkit-filter my-filter{}", 67 "@-webkit-filter my-filter{}",
68 "@-webkit-filter my-filter { }"); 68 "@-webkit-filter my-filter { }");
69 testFilterAtRule("Rule with arbitrary properties.", 69 testFilterAtRule("Rule with arbitrary properties.",
70 "@-webkit-filter my-filter { width: 100px; height: 100px; }", 70 "@-webkit-filter my-filter { width: 100px; height: 100px; }",
71 "@-webkit-filter my-filter { width: 100px; height: 100px; }", 71 "@-webkit-filter my-filter { width: 100px; height: 100px; }",
72 {width: "100px", height: "100px"}); 72 {width: "100px", height: "100px"});
73 testFilterAtRule("Empty rule, missing closing brace.", 73 testFilterAtRule("Empty rule, missing closing brace.",
74 "@-webkit-filter my-filter {", 74 "@-webkit-filter my-filter {",
75 "@-webkit-filter my-filter { }"); 75 "@-webkit-filter my-filter { }");
76 testFilterAtRule("Empty rule, comment separators",
77 "@-webkit-filter/**/my-filter/**/{ }",
78 "@-webkit-filter my-filter { }");
79 testFilterAtRule("Empty rule, comment+space separators",
80 "@-webkit-filter/**/ my-filter/**/ { }",
81 "@-webkit-filter my-filter { }");
82 testFilterAtRule("Empty rule, space+comment separators",
83 "@-webkit-filter /**/my-filter /**/{ }",
84 "@-webkit-filter my-filter { }");
85 testFilterAtRule("Empty rule, space+comment+space separators",
86 "@-webkit-filter /**/ my-filter /**/ { }",
87 "@-webkit-filter my-filter { }");
76 88
77 heading("Nested filter at-rule tests."); 89 heading("Nested filter at-rule tests.");
78 testNestedRules("Nested rule.", 90 testNestedRules("Nested rule.",
79 "@-webkit-filter parent-filter { @-webkit-filter child-filter { } }", 91 "@-webkit-filter parent-filter { @-webkit-filter child-filter { } }",
80 { 92 {
81 cssText: "@-webkit-filter parent-filter { }", 93 cssText: "@-webkit-filter parent-filter { }",
82 ruleType: CSSRule.WEBKIT_FILTER_RULE, 94 ruleType: CSSRule.WEBKIT_FILTER_RULE,
83 constructorName: "WebKitCSSFilterRule" 95 constructorName: "WebKitCSSFilterRule"
84 }); 96 });
85 testNestedRules("Twice nested rule.", 97 testNestedRules("Twice nested rule.",
(...skipping 15 matching lines...) Expand all
101 { 113 {
102 cssText: "@media screen { \n @-webkit-filter child-filter { }\n}", 114 cssText: "@media screen { \n @-webkit-filter child-filter { }\n}",
103 ruleType: CSSRule.MEDIA_RULE, 115 ruleType: CSSRule.MEDIA_RULE,
104 constructorName: "CSSMediaRule", 116 constructorName: "CSSMediaRule",
105 }, 117 },
106 { 118 {
107 cssText: "@-webkit-filter child-filter { }", 119 cssText: "@-webkit-filter child-filter { }",
108 ruleType: CSSRule.WEBKIT_FILTER_RULE, 120 ruleType: CSSRule.WEBKIT_FILTER_RULE,
109 constructorName: "WebKitCSSFilterRule", 121 constructorName: "WebKitCSSFilterRule",
110 }); 122 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698