OLD | NEW |
1 Test CSSSupportRule. | 1 Test CSSSupportRule. |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 PASS CSSRule.SUPPORTS_RULE is defined. | 6 PASS CSSRule.SUPPORTS_RULE is defined. |
7 rules = document.styleSheets[1].cssRules | 7 rules = document.styleSheets[1].cssRules |
8 PASS rules.length is 4 | 8 PASS rules.length is 4 |
9 PASS rules[0].type is CSSRule.SUPPORTS_RULE | 9 PASS rules[0].type is CSSRule.SUPPORTS_RULE |
10 PASS rules[0].cssRules.length is 2 | 10 PASS rules[0].cssRules.length is 2 |
11 PASS rules[0].cssRules[0].type is CSSRule.STYLE_RULE | 11 PASS rules[0].cssRules[0].type is CSSRule.STYLE_RULE |
12 PASS rules[0].cssRules[1].type is CSSRule.SUPPORTS_RULE | 12 PASS rules[0].cssRules[1].type is CSSRule.SUPPORTS_RULE |
13 PASS rules[0].cssRules[1].cssRules.length is 1 | 13 PASS rules[0].cssRules[1].cssRules.length is 1 |
14 PASS rules[0].cssRules[1].cssRules[0].type is CSSRule.STYLE_RULE | 14 PASS rules[0].cssRules[1].cssRules[0].type is CSSRule.STYLE_RULE |
15 PASS rules[0].conditionText is "(width: 0)" | 15 PASS rules[0].conditionText is "(width: 0)" |
16 PASS rules[0].cssText is "@supports (width: 0) {\n s { width: 0px; }\n @suppor
ts (width: 1) {\n s { color: rgb(0, 0, 0); }\n}\n}" | 16 PASS rules[0].cssText is "@supports (width: 0) {\n s { width: 0px; }\n @suppor
ts (width: 1) {\n s { color: rgb(0, 0, 0); }\n}\n}" |
17 | 17 |
| 18 Missing argument exceptions. |
| 19 PASS rules[0].insertRule() threw exception TypeError: Failed to execute 'insertR
ule' on 'CSSSupportsRule': 2 arguments required, but only 0 present.. |
| 20 PASS rules[0].insertRule('@media all {}') threw exception TypeError: Failed to e
xecute 'insertRule' on 'CSSSupportsRule': 2 arguments required, but only 1 prese
nt.. |
| 21 PASS rules[0].deleteRule() threw exception TypeError: Failed to execute 'deleteR
ule' on 'CSSSupportsRule': 1 argument required, but only 0 present.. |
| 22 |
18 Inserting and deleting rules. | 23 Inserting and deleting rules. |
19 rules[0].insertRule('@media all { #s { width: 0px; } }', 2) | 24 rules[0].insertRule('@media all { #s { width: 0px; } }', 2) |
20 PASS rules[0].cssRules.length is 3 | 25 PASS rules[0].cssRules.length is 3 |
21 PASS rules[0].cssRules[2].type is CSSRule.MEDIA_RULE | 26 PASS rules[0].cssRules[2].type is CSSRule.MEDIA_RULE |
22 rules[0].deleteRule(2) | 27 rules[0].deleteRule(2) |
23 PASS rules[0].cssRules.length is 2 | 28 PASS rules[0].cssRules.length is 2 |
24 rules[0].cssRules[1].insertRule('@supports (display: rainbow) {}', 1) | 29 rules[0].cssRules[1].insertRule('@supports (display: rainbow) {}', 1) |
25 PASS rules[0].cssRules[1].cssRules.length is 2 | 30 PASS rules[0].cssRules[1].cssRules.length is 2 |
26 PASS rules[0].cssRules[1].cssRules[1].type is CSSRule.SUPPORTS_RULE | 31 PASS rules[0].cssRules[1].cssRules[1].type is CSSRule.SUPPORTS_RULE |
27 rules[0].cssRules[1].deleteRule(1) | 32 rules[0].cssRules[1].deleteRule(1) |
(...skipping 25 matching lines...) Expand all Loading... |
53 PASS rules[0].type is CSSRule.SUPPORTS_RULE | 58 PASS rules[0].type is CSSRule.SUPPORTS_RULE |
54 PASS rules[0].cssRules.length is 2 | 59 PASS rules[0].cssRules.length is 2 |
55 PASS rules[0].cssRules[0].type is CSSRule.STYLE_RULE | 60 PASS rules[0].cssRules[0].type is CSSRule.STYLE_RULE |
56 PASS rules[0].cssRules[1].type is CSSRule.SUPPORTS_RULE | 61 PASS rules[0].cssRules[1].type is CSSRule.SUPPORTS_RULE |
57 PASS rules[0].cssRules[1].cssRules.length is 1 | 62 PASS rules[0].cssRules[1].cssRules.length is 1 |
58 PASS rules[0].cssRules[1].cssRules[0].type is CSSRule.STYLE_RULE | 63 PASS rules[0].cssRules[1].cssRules[0].type is CSSRule.STYLE_RULE |
59 PASS successfullyParsed is true | 64 PASS successfullyParsed is true |
60 | 65 |
61 TEST COMPLETE | 66 TEST COMPLETE |
62 | 67 |
OLD | NEW |