Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / parsing-css-comment.html
blob2974e0d1fda281649ddbd8db3ca5a9d0137043a1
1 <head>
2 <style>
3 #a { color: green; }
4 /*
5 Normal multiline comment
6 */
7 #b { color: green; }
8 /*
9 #c { color: green; }
12 /* Single line comment */
13 /* #d { color: green; } */
14 #e { color: green; }
16 /*/ Comment start with slash */
17 /*/ #f { color: green; } */
19 /* #g is valid: */
20 /**/ #g { color: green; } */
21 #h { color: green; }
22 /**/#i/**/{/**/color/**/:/**/green/**/;/**/}
24 /* Unterminated comment. Should not crash.
25 </style>
27 <script>
29 function runTest()
31 if (window.testRunner)
32 testRunner.dumpAsText();
34 var rules = document.styleSheets[0].cssRules;
35 var text = "";
36 for (var i = 0; i < rules.length; i++) {
37 text += rules.item(i).cssText;
38 text += "\n";
41 document.getElementById("result").appendChild(document.createTextNode(text));
43 if (document.getElementById("result").firstChild.data === document.getElementById("expected").firstChild.data)
44 document.getElementById("message").firstChild.data = "SUCCESS";
45 else
46 document.getElementById("message").firstChild.data = "FAILURE";
49 </script>
51 </head>
53 <body onload="runTest()">
55 <p>Test parsing of CSS nth-child tokens.</p>
57 <p id="message">TEST DID NOT COMPLETE</p>
59 <p>Rules from the stylesheet:</p>
61 <pre id="result"></pre>
63 <p>Expected result:</p>
65 <pre id="expected">#a { color: green; }
66 #b { color: green; }
67 #e { color: green; }
68 #g { color: green; }
69 #i { color: green; }
70 </pre>
72 <script>
74 </script>
75 </body>