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

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

Issue 14065029: Improved parse error handling for CSSMQ. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 testFilterAtRule("Empty rule, separated by multiple spaces.", 63 testFilterAtRule("Empty rule, separated by multiple spaces.",
64 " @-webkit-filter my-filter { } ", 64 " @-webkit-filter my-filter { } ",
65 "@-webkit-filter my-filter { }"); 65 "@-webkit-filter my-filter { }");
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.",
74 "@-webkit-filter my-filter {",
75 "@-webkit-filter my-filter { }");
73 76
74 heading("Nested filter at-rule tests."); 77 heading("Nested filter at-rule tests.");
75 testNestedRules("Nested rule.", 78 testNestedRules("Nested rule.",
76 "@-webkit-filter parent-filter { @-webkit-filter child-filter { } }", 79 "@-webkit-filter parent-filter { @-webkit-filter child-filter { } }",
77 { 80 {
78 cssText: "@-webkit-filter parent-filter { }", 81 cssText: "@-webkit-filter parent-filter { }",
79 ruleType: CSSRule.WEBKIT_FILTER_RULE, 82 ruleType: CSSRule.WEBKIT_FILTER_RULE,
80 constructorName: "WebKitCSSFilterRule" 83 constructorName: "WebKitCSSFilterRule"
81 }); 84 });
82 testNestedRules("Twice nested rule.", 85 testNestedRules("Twice nested rule.",
(...skipping 15 matching lines...) Expand all
98 { 101 {
99 cssText: "@media screen { \n @-webkit-filter child-filter { }\n}", 102 cssText: "@media screen { \n @-webkit-filter child-filter { }\n}",
100 ruleType: CSSRule.MEDIA_RULE, 103 ruleType: CSSRule.MEDIA_RULE,
101 constructorName: "CSSMediaRule", 104 constructorName: "CSSMediaRule",
102 }, 105 },
103 { 106 {
104 cssText: "@-webkit-filter child-filter { }", 107 cssText: "@-webkit-filter child-filter { }",
105 ruleType: CSSRule.WEBKIT_FILTER_RULE, 108 ruleType: CSSRule.WEBKIT_FILTER_RULE,
106 constructorName: "WebKitCSSFilterRule", 109 constructorName: "WebKitCSSFilterRule",
107 }); 110 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698