| /* Single line comment */ |
| /* #d { color: green; } */ |
| /*/ Comment start with slash */ |
| /*/ #f { color: green; } */ |
| /**/ #g { color: green; } */ |
| /**/#i/**/{/**/color/**/:/**/green/**/;/**/} |
| /* Unterminated comment. Should not crash. |
| var rules = document.styleSheets[0].cssRules; |
| for (var i = 0; i < rules.length; i++) { |
| text += rules.item(i).cssText; |
| document.getElementById("result").appendChild(document.createTextNode(text)); |
| if (document.getElementById("result").firstChild.data === document.getElementById("expected").firstChild.data) |
| document.getElementById("message").firstChild.data = "SUCCESS"; |
| document.getElementById("message").firstChild.data = "FAILURE"; |
| <body onload="runTest()"> |
| <p>Test parsing of CSS nth-child tokens.</p> |
| <p id="message">TEST DID NOT COMPLETE</p> |
| <p>Rules from the stylesheet:</p> |
| <pre id="expected">#a { color: green; } |