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] is an instance of CSSSupportsRule | 9 PASS rules[0] is an instance of CSSSupportsRule |
10 PASS rules[0].type is CSSRule.SUPPORTS_RULE | 10 PASS rules[0].type is CSSRule.SUPPORTS_RULE |
(...skipping 23 matching lines...) Expand all Loading... |
34 PASS rules[0].cssRules[1].cssRules[1].type is CSSRule.SUPPORTS_RULE | 34 PASS rules[0].cssRules[1].cssRules[1].type is CSSRule.SUPPORTS_RULE |
35 rules[0].cssRules[1].deleteRule(1) | 35 rules[0].cssRules[1].deleteRule(1) |
36 PASS rules[0].cssRules.length is 2 | 36 PASS rules[0].cssRules.length is 2 |
37 | 37 |
38 @charset, @namespace, @import rules are not allowed inside @supports. | 38 @charset, @namespace, @import rules are not allowed inside @supports. |
39 PASS rules[0].insertRule('@charset "UTF-8"', 2) threw exception SyntaxError: Fai
led to execute 'insertRule' on 'CSSSupportsRule': the rule '@charset "UTF-8"' is
invalid and cannot be parsed.. | 39 PASS rules[0].insertRule('@charset "UTF-8"', 2) threw exception SyntaxError: Fai
led to execute 'insertRule' on 'CSSSupportsRule': the rule '@charset "UTF-8"' is
invalid and cannot be parsed.. |
40 PASS rules[0].insertRule('@namespace ""', 2) threw exception SyntaxError: Failed
to execute 'insertRule' on 'CSSSupportsRule': the rule '@namespace ""' is inval
id and cannot be parsed.. | 40 PASS rules[0].insertRule('@namespace ""', 2) threw exception SyntaxError: Failed
to execute 'insertRule' on 'CSSSupportsRule': the rule '@namespace ""' is inval
id and cannot be parsed.. |
41 PASS rules[0].insertRule('@import url("../fast/cssom/resources/import.css")', 2)
threw exception HierarchyRequestError: Failed to execute 'insertRule' on 'CSSSu
pportsRule': '@import' rules cannot be inserted inside a group rule.. | 41 PASS rules[0].insertRule('@import url("../fast/cssom/resources/import.css")', 2)
threw exception HierarchyRequestError: Failed to execute 'insertRule' on 'CSSSu
pportsRule': '@import' rules cannot be inserted inside a group rule.. |
42 | 42 |
43 Whitespace and formatting should be preserved within the condition, whitespace o
utside the condition should be trimmed. | 43 Whitespace and formatting should be preserved within the condition, whitespace o
utside the condition should be trimmed. |
44 PASS rules[1].conditionText is "(( ( padding: 0) and (display: none)) or
(display: rainbow))" | 44 PASS rules[1].conditionText is "(( ( padding: 0) and (display: none)) or (displa
y: rainbow))" |
45 | 45 |
46 @supports rule nested inside a media rule. | 46 @supports rule nested inside a media rule. |
47 PASS rules[2].type is CSSRule.MEDIA_RULE | 47 PASS rules[2].type is CSSRule.MEDIA_RULE |
48 PASS rules[2].cssRules.length is 1 | 48 PASS rules[2].cssRules.length is 1 |
49 PASS rules[2].cssRules[0] is an instance of CSSSupportsRule | 49 PASS rules[2].cssRules[0] is an instance of CSSSupportsRule |
50 PASS rules[2].cssRules[0].type is CSSRule.SUPPORTS_RULE | 50 PASS rules[2].cssRules[0].type is CSSRule.SUPPORTS_RULE |
51 PASS rules[2].cssRules[0].conditionText is "( padding: 0)" | 51 PASS rules[2].cssRules[0].conditionText is "( padding: 0)" |
52 PASS rules[0].cssRules[1].cssRules.length is 1 | 52 PASS rules[0].cssRules[1].cssRules.length is 1 |
53 PASS rules[2].cssRules[0].cssRules[0].type is CSSRule.PAGE_RULE | 53 PASS rules[2].cssRules[0].cssRules[0].type is CSSRule.PAGE_RULE |
54 PASS rules[2].cssText is "@media all { \n @supports ( padding: 0) {\n @page :l
eft { top: 0px; }\n}\n}" | 54 PASS rules[2].cssText is "@media all { \n @supports ( padding: 0) {\n @page :l
eft { top: 0px; }\n}\n}" |
55 | 55 |
56 No extra parens should be added to the conditionText. | 56 No extra parens should be added to the conditionText. |
57 PASS rules[3].conditionText is "(border: black) and (padding: 0) and (width: 0)" | 57 PASS rules[3].conditionText is "(border: black) and (padding: 0) and (width: 0)" |
58 | 58 |
59 Deleting a top-level rule should work correctly. | 59 Deleting a top-level rule should work correctly. |
60 document.styleSheets[1].deleteRule(3) | 60 document.styleSheets[1].deleteRule(3) |
61 PASS rules.length is 3 | 61 PASS rules.length is 3 |
62 PASS rules[0].type is CSSRule.SUPPORTS_RULE | 62 PASS rules[0].type is CSSRule.SUPPORTS_RULE |
63 PASS rules[0].cssRules.length is 2 | 63 PASS rules[0].cssRules.length is 2 |
64 PASS rules[0].cssRules[0].type is CSSRule.STYLE_RULE | 64 PASS rules[0].cssRules[0].type is CSSRule.STYLE_RULE |
65 PASS rules[0].cssRules[1].type is CSSRule.SUPPORTS_RULE | 65 PASS rules[0].cssRules[1].type is CSSRule.SUPPORTS_RULE |
66 PASS rules[0].cssRules[1].cssRules.length is 1 | 66 PASS rules[0].cssRules[1].cssRules.length is 1 |
67 PASS rules[0].cssRules[1].cssRules[0].type is CSSRule.STYLE_RULE | 67 PASS rules[0].cssRules[1].cssRules[0].type is CSSRule.STYLE_RULE |
68 PASS successfullyParsed is true | 68 PASS successfullyParsed is true |
69 | 69 |
70 TEST COMPLETE | 70 TEST COMPLETE |
71 | 71 |
OLD | NEW |