blob: 2974e0d1fda281649ddbd8db3ca5a9d0137043a1 [file] [log] [blame]
<head>
<style>
#a { color: green; }
/*
Normal multiline comment
*/
#b { color: green; }
/*
#c { color: green; }
*/
/* Single line comment */
/* #d { color: green; } */
#e { color: green; }
/*/ Comment start with slash */
/*/ #f { color: green; } */
/* #g is valid: */
/**/ #g { color: green; } */
#h { color: green; }
/**/#i/**/{/**/color/**/:/**/green/**/;/**/}
/* Unterminated comment. Should not crash.
</style>
<script>
function runTest()
{
if (window.testRunner)
testRunner.dumpAsText();
var rules = document.styleSheets[0].cssRules;
var text = "";
for (var i = 0; i < rules.length; i++) {
text += rules.item(i).cssText;
text += "\n";
}
document.getElementById("result").appendChild(document.createTextNode(text));
if (document.getElementById("result").firstChild.data === document.getElementById("expected").firstChild.data)
document.getElementById("message").firstChild.data = "SUCCESS";
else
document.getElementById("message").firstChild.data = "FAILURE";
}
</script>
</head>
<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="result"></pre>
<p>Expected result:</p>
<pre id="expected">#a { color: green; }
#b { color: green; }
#e { color: green; }
#g { color: green; }
#i { color: green; }
</pre>
<script>
</script>
</body>