2011-01-26 Martin Robinson <mrobinson@igalia.com>
[WebKit-https.git] / LayoutTests / inspector / syntax-highlight-css.html
1 <html>
2 <head>
3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script src="syntax-highlight.js"></script>
5 <script>
6
7 // Frontend functions.
8
9 function frontend_dumpSyntaxHighlightCSS(str)
10 {
11     return frontend_dumpSyntaxHighlight(str, "text/css");
12 }
13
14 function frontend_doitAndDump() {
15     var result = [];
16     result.push(frontend_dumpSyntaxHighlightCSS("a[href='/']"));
17     result.push(frontend_dumpSyntaxHighlightCSS("#content > a:hover"));
18     result.push(frontend_dumpSyntaxHighlightCSS("@import url(style.css);"));
19     result.push(frontend_dumpSyntaxHighlightCSS("@import url(\"style.css\") projection, tv;"));
20     result.push(frontend_dumpSyntaxHighlightCSS("@media screen { body { color: red; } }"));
21     result.push(frontend_dumpSyntaxHighlightCSS("@font-face { font-family: MyHelvetica; }"));
22     result.push(frontend_dumpSyntaxHighlightCSS("p { color: color; red: red; }"));
23     result.push(frontend_dumpSyntaxHighlightCSS("p { margin: -10px !important; }"));
24     return result;
25 }
26
27 </script>
28 </head>
29
30 <body onload="onload()">
31 <p>
32 Tests that CSSSourceSyntaxHighlighter detects the tokens.
33 </p>
34
35 </body>
36 </html>