| Test nested at-rules. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| rules = document.styleSheets[1].cssRules |
| PASS rules.length is 2 |
| PASS rules[0].type is CSSRule.STYLE_RULE |
| PASS rules[1].type is CSSRule.MEDIA_RULE |
| PASS rules[1].cssRules.length is 2 |
| PASS rules[1].cssRules[0].type is CSSRule.MEDIA_RULE |
| PASS rules[1].cssRules[0].cssRules.length is 3 |
| PASS rules[1].cssRules[0].cssRules[0].type is CSSRule.FONT_FACE_RULE |
| PASS rules[1].cssRules[0].cssRules[1].type is CSSRule.PAGE_RULE |
| PASS rules[1].cssRules[0].cssRules[2].type is CSSRule.STYLE_RULE |
| PASS rules[1].cssRules[0].cssRules[0].parentStyleSheet is document.styleSheets[1] |
| PASS rules[1].cssRules[0].cssRules[1].parentStyleSheet is document.styleSheets[1] |
| PASS rules[1].cssRules[0].cssRules[2].parentStyleSheet is document.styleSheets[1] |
| PASS rules[1].cssRules[1].type is CSSRule.MEDIA_RULE |
| PASS rules[1].cssRules[1].cssRules.length is 1 |
| PASS rules[1].cssRules[1].cssRules[0].type is CSSRule.MEDIA_RULE |
| rules[1].cssRules[1].insertRule('@media all { @page :left { top: 0; } }', 1) |
| PASS rules[1].cssRules[1].cssRules.length is 2 |
| PASS rules[1].cssRules[1].cssRules[1].type is CSSRule.MEDIA_RULE |
| PASS rules[1].cssRules[1].cssRules[1].cssRules[0].type is CSSRule.PAGE_RULE |
| PASS getComputedStyle(document.getElementById('t0')).content is "APPLIED" |
| PASS getComputedStyle(document.getElementById('t1')).content is "UNTOUCHED" |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |