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 |
(...skipping 12 matching lines...) Expand all Loading... |
23 PASS rules[0].cssRules.length is 2 | 23 PASS rules[0].cssRules.length is 2 |
24 rules[0].cssRules[1].insertRule('@supports (display: rainbow) {}', 1) | 24 rules[0].cssRules[1].insertRule('@supports (display: rainbow) {}', 1) |
25 PASS rules[0].cssRules[1].cssRules.length is 2 | 25 PASS rules[0].cssRules[1].cssRules.length is 2 |
26 PASS rules[0].cssRules[1].cssRules[1].type is CSSRule.SUPPORTS_RULE | 26 PASS rules[0].cssRules[1].cssRules[1].type is CSSRule.SUPPORTS_RULE |
27 rules[0].cssRules[1].deleteRule(1) | 27 rules[0].cssRules[1].deleteRule(1) |
28 PASS rules[0].cssRules.length is 2 | 28 PASS rules[0].cssRules.length is 2 |
29 | 29 |
30 @charset, @namespace, @import rules are not allowed inside @supports. | 30 @charset, @namespace, @import rules are not allowed inside @supports. |
31 PASS rules[0].insertRule('@charset "UTF-8"', 2) threw exception SyntaxError: An
invalid or illegal string was specified.. | 31 PASS rules[0].insertRule('@charset "UTF-8"', 2) threw exception SyntaxError: An
invalid or illegal string was specified.. |
32 PASS rules[0].insertRule('@namespace ""', 2) threw exception SyntaxError: An inv
alid or illegal string was specified.. | 32 PASS rules[0].insertRule('@namespace ""', 2) threw exception SyntaxError: An inv
alid or illegal string was specified.. |
33 PASS rules[0].insertRule('@import url("../fast/cssom/resources/import.css")', 2)
threw exception SyntaxError: An invalid or illegal string was specified.. | 33 PASS rules[0].insertRule('@import url("../fast/cssom/resources/import.css")', 2)
threw exception HierarchyRequestError: A Node was inserted somewhere it doesn't
belong.. |
34 | 34 |
35 Whitespace and formatting should be preserved within the condition, whitespace o
utside the condition should be trimmed. | 35 Whitespace and formatting should be preserved within the condition, whitespace o
utside the condition should be trimmed. |
36 PASS rules[1].conditionText is "(( ( padding: 0) and (display: none)) or
(display: rainbow))" | 36 PASS rules[1].conditionText is "(( ( padding: 0) and (display: none)) or
(display: rainbow))" |
37 | 37 |
38 @supports rule nested inside a media rule. | 38 @supports rule nested inside a media rule. |
39 PASS rules[2].type is CSSRule.MEDIA_RULE | 39 PASS rules[2].type is CSSRule.MEDIA_RULE |
40 PASS rules[2].cssRules.length is 1 | 40 PASS rules[2].cssRules.length is 1 |
41 PASS rules[2].cssRules[0].type is CSSRule.SUPPORTS_RULE | 41 PASS rules[2].cssRules[0].type is CSSRule.SUPPORTS_RULE |
42 PASS rules[2].cssRules[0].conditionText is "( padding: 0)" | 42 PASS rules[2].cssRules[0].conditionText is "( padding: 0)" |
43 PASS rules[0].cssRules[1].cssRules.length is 1 | 43 PASS rules[0].cssRules[1].cssRules.length is 1 |
44 PASS rules[2].cssRules[0].cssRules[0].type is CSSRule.PAGE_RULE | 44 PASS rules[2].cssRules[0].cssRules[0].type is CSSRule.PAGE_RULE |
45 PASS rules[2].cssText is "@media all { \n @supports ( padding: 0) {\n @page :l
eft { top: 0px; }\n}\n}" | 45 PASS rules[2].cssText is "@media all { \n @supports ( padding: 0) {\n @page :l
eft { top: 0px; }\n}\n}" |
46 | 46 |
47 No extra parens should be added to the conditionText. | 47 No extra parens should be added to the conditionText. |
48 PASS rules[3].conditionText is "(border: black) and (padding: 0) and (width: 0)" | 48 PASS rules[3].conditionText is "(border: black) and (padding: 0) and (width: 0)" |
49 | 49 |
50 Deleting a top-level rule should work correctly. | 50 Deleting a top-level rule should work correctly. |
51 document.styleSheets[1].deleteRule(3) | 51 document.styleSheets[1].deleteRule(3) |
52 PASS rules.length is 3 | 52 PASS rules.length is 3 |
53 PASS rules[0].type is CSSRule.SUPPORTS_RULE | 53 PASS rules[0].type is CSSRule.SUPPORTS_RULE |
54 PASS rules[0].cssRules.length is 2 | 54 PASS rules[0].cssRules.length is 2 |
55 PASS rules[0].cssRules[0].type is CSSRule.STYLE_RULE | 55 PASS rules[0].cssRules[0].type is CSSRule.STYLE_RULE |
56 PASS rules[0].cssRules[1].type is CSSRule.SUPPORTS_RULE | 56 PASS rules[0].cssRules[1].type is CSSRule.SUPPORTS_RULE |
57 PASS rules[0].cssRules[1].cssRules.length is 1 | 57 PASS rules[0].cssRules[1].cssRules.length is 1 |
58 PASS rules[0].cssRules[1].cssRules[0].type is CSSRule.STYLE_RULE | 58 PASS rules[0].cssRules[1].cssRules[0].type is CSSRule.STYLE_RULE |
59 PASS successfullyParsed is true | 59 PASS successfullyParsed is true |
60 | 60 |
61 TEST COMPLETE | 61 TEST COMPLETE |
62 | 62 |
OLD | NEW |