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

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

Issue 797013002: Make CSSSupportsRule function arguments non-optional (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/css3/supports-cssom-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 shouldBe("rules[0].cssRules[1].cssRules[0].type", "CSSRule.STYLE_RULE"); 66 shouldBe("rules[0].cssRules[1].cssRules[0].type", "CSSRule.STYLE_RULE");
67 shouldBeEqualToString("rules[0].conditionText", "(width: 0)"); 67 shouldBeEqualToString("rules[0].conditionText", "(width: 0)");
68 shouldBeEqualToString("rules[0].cssText", 68 shouldBeEqualToString("rules[0].cssText",
69 "@supports (width: 0) {\n" + 69 "@supports (width: 0) {\n" +
70 " s { width: 0px; }\n" + 70 " s { width: 0px; }\n" +
71 " @supports (width: 1) {\n" + 71 " @supports (width: 1) {\n" +
72 " s { color: rgb(0, 0, 0); }\n" + 72 " s { color: rgb(0, 0, 0); }\n" +
73 "}\n" + 73 "}\n" +
74 "}"); 74 "}");
75 75
76 debug("\nMissing argument exceptions.");
77 shouldThrow("rules[0].insertRule()");
78 shouldThrow("rules[0].insertRule('@media all {}')");
79 shouldThrow("rules[0].deleteRule()");
80
76 debug("\nInserting and deleting rules."); 81 debug("\nInserting and deleting rules.");
77 evalAndLog("rules[0].insertRule('@media all { #s { width: 0px; } }', 2)"); 82 evalAndLog("rules[0].insertRule('@media all { #s { width: 0px; } }', 2)");
78 shouldEvaluateTo("rules[0].cssRules.length", 3); 83 shouldEvaluateTo("rules[0].cssRules.length", 3);
79 shouldBe("rules[0].cssRules[2].type", "CSSRule.MEDIA_RULE"); 84 shouldBe("rules[0].cssRules[2].type", "CSSRule.MEDIA_RULE");
80 evalAndLog("rules[0].deleteRule(2)"); 85 evalAndLog("rules[0].deleteRule(2)");
81 shouldEvaluateTo("rules[0].cssRules.length", 2); 86 shouldEvaluateTo("rules[0].cssRules.length", 2);
82 87
83 evalAndLog("rules[0].cssRules[1].insertRule('@supports (display: rainbow) {} ', 1)"); 88 evalAndLog("rules[0].cssRules[1].insertRule('@supports (display: rainbow) {} ', 1)");
84 shouldEvaluateTo("rules[0].cssRules[1].cssRules.length", 2); 89 shouldEvaluateTo("rules[0].cssRules[1].cssRules.length", 2);
85 shouldBe("rules[0].cssRules[1].cssRules[1].type", "CSSRule.SUPPORTS_RULE"); 90 shouldBe("rules[0].cssRules[1].cssRules[1].type", "CSSRule.SUPPORTS_RULE");
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 shouldEvaluateTo("rules[0].cssRules.length", 2); 127 shouldEvaluateTo("rules[0].cssRules.length", 2);
123 shouldBe("rules[0].cssRules[0].type", "CSSRule.STYLE_RULE"); 128 shouldBe("rules[0].cssRules[0].type", "CSSRule.STYLE_RULE");
124 shouldBe("rules[0].cssRules[1].type", "CSSRule.SUPPORTS_RULE"); 129 shouldBe("rules[0].cssRules[1].type", "CSSRule.SUPPORTS_RULE");
125 shouldEvaluateTo("rules[0].cssRules[1].cssRules.length", 1); 130 shouldEvaluateTo("rules[0].cssRules[1].cssRules.length", 1);
126 shouldBe("rules[0].cssRules[1].cssRules[0].type", "CSSRule.STYLE_RULE"); 131 shouldBe("rules[0].cssRules[1].cssRules[0].type", "CSSRule.STYLE_RULE");
127 132
128 </script> 133 </script>
129 </body> 134 </body>
130 </html> 135 </html>
131 136
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/css3/supports-cssom-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698