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

Side by Side Diff: LayoutTests/css3/supports-cssom.html

Issue 99083002: WIP: Migrate generated bindings to new ExceptionState constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 7 years 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 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta charset=utf8> 4 <meta charset=utf8>
5 <script src="../resources/js-test.js"></script> 5 <script src="../resources/js-test.js"></script>
6 <style> 6 <style>
7 @supports (width: 0) { 7 @supports (width: 0) {
8 s { width: 0; } 8 s { width: 0; }
9 @supports (width: 1) { 9 @supports (width: 1) {
10 s { color: #000; } 10 s { color: #000; }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 evalAndLog("rules[0].deleteRule(2)"); 80 evalAndLog("rules[0].deleteRule(2)");
81 shouldEvaluateTo("rules[0].cssRules.length", 2); 81 shouldEvaluateTo("rules[0].cssRules.length", 2);
82 82
83 evalAndLog("rules[0].cssRules[1].insertRule('@supports (display: rainbow) {} ', 1)"); 83 evalAndLog("rules[0].cssRules[1].insertRule('@supports (display: rainbow) {} ', 1)");
84 shouldEvaluateTo("rules[0].cssRules[1].cssRules.length", 2); 84 shouldEvaluateTo("rules[0].cssRules[1].cssRules.length", 2);
85 shouldBe("rules[0].cssRules[1].cssRules[1].type", "CSSRule.SUPPORTS_RULE"); 85 shouldBe("rules[0].cssRules[1].cssRules[1].type", "CSSRule.SUPPORTS_RULE");
86 evalAndLog("rules[0].cssRules[1].deleteRule(1)"); 86 evalAndLog("rules[0].cssRules[1].deleteRule(1)");
87 shouldEvaluateTo("rules[0].cssRules.length", 2); 87 shouldEvaluateTo("rules[0].cssRules.length", 2);
88 88
89 debug("\n@charset, @namespace, @import rules are not allowed inside @support s.") 89 debug("\n@charset, @namespace, @import rules are not allowed inside @support s.")
90 shouldThrow("rules[0].insertRule('@charset \"UTF-8\"', 2)", '"SyntaxError: F ailed to execute \'insertRule\' on \'CSSGroupingRule\': the rule \'@charset \\"U TF-8\\"\' is invalid and cannot be parsed."'); 90 shouldThrow("rules[0].insertRule('@charset \"UTF-8\"', 2)", '"SyntaxError: F ailed to execute \'insertRule\' on \'CSSSupportsRule\': the rule \'@charset \\"U TF-8\\"\' is invalid and cannot be parsed."');
91 shouldThrow("rules[0].insertRule('@namespace \"\"', 2)", '"SyntaxError: Fail ed to execute \'insertRule\' on \'CSSGroupingRule\': the rule \'@namespace \\"\\ "\' is invalid and cannot be parsed."'); 91 shouldThrow("rules[0].insertRule('@namespace \"\"', 2)", '"SyntaxError: Fail ed to execute \'insertRule\' on \'CSSSupportsRule\': the rule \'@namespace \\"\\ "\' is invalid and cannot be parsed."');
92 shouldThrow("rules[0].insertRule('@import url(\"../fast/cssom/resources/impo rt.css\")', 2)", '"HierarchyRequestError: Failed to execute \'insertRule\' on \' CSSGroupingRule\': \'@import\' rules cannot be inserted inside a group rule."'); 92 shouldThrow("rules[0].insertRule('@import url(\"../fast/cssom/resources/impo rt.css\")', 2)", '"HierarchyRequestError: Failed to execute \'insertRule\' on \' CSSSupportsRule\': \'@import\' rules cannot be inserted inside a group rule."');
93 93
94 94
95 debug("\nWhitespace and formatting should be preserved within the condition, whitespace outside the condition should be trimmed."); 95 debug("\nWhitespace and formatting should be preserved within the condition, whitespace outside the condition should be trimmed.");
96 shouldBeEqualToString("rules[1].conditionText", "(( ( padding: 0) an d (display: none)) or (display: rainbow))"); 96 shouldBeEqualToString("rules[1].conditionText", "(( ( padding: 0) an d (display: none)) or (display: rainbow))");
97 97
98 98
99 debug("\n@supports rule nested inside a media rule."); 99 debug("\n@supports rule nested inside a media rule.");
100 shouldBe("rules[2].type", "CSSRule.MEDIA_RULE"); 100 shouldBe("rules[2].type", "CSSRule.MEDIA_RULE");
101 shouldEvaluateTo("rules[2].cssRules.length", 1); 101 shouldEvaluateTo("rules[2].cssRules.length", 1);
102 shouldBe("rules[2].cssRules[0].type", "CSSRule.SUPPORTS_RULE"); 102 shouldBe("rules[2].cssRules[0].type", "CSSRule.SUPPORTS_RULE");
(...skipping 19 matching lines...) Expand all
122 shouldEvaluateTo("rules[0].cssRules.length", 2); 122 shouldEvaluateTo("rules[0].cssRules.length", 2);
123 shouldBe("rules[0].cssRules[0].type", "CSSRule.STYLE_RULE"); 123 shouldBe("rules[0].cssRules[0].type", "CSSRule.STYLE_RULE");
124 shouldBe("rules[0].cssRules[1].type", "CSSRule.SUPPORTS_RULE"); 124 shouldBe("rules[0].cssRules[1].type", "CSSRule.SUPPORTS_RULE");
125 shouldEvaluateTo("rules[0].cssRules[1].cssRules.length", 1); 125 shouldEvaluateTo("rules[0].cssRules[1].cssRules.length", 1);
126 shouldBe("rules[0].cssRules[1].cssRules[0].type", "CSSRule.STYLE_RULE"); 126 shouldBe("rules[0].cssRules[1].cssRules[0].type", "CSSRule.STYLE_RULE");
127 127
128 </script> 128 </script>
129 </body> 129 </body>
130 </html> 130 </html>
131 131
OLDNEW
« no previous file with comments | « LayoutTests/crypto/sign-verify-expected.txt ('k') | LayoutTests/css3/supports-cssom-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698