| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |