3 <script src=
"../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"syntax-highlight.js"></script>
9 function dumpSyntaxHighlightJS(str
)
11 return InspectorTest
.dumpSyntaxHighlight(str
, "text/javascript");
14 dumpSyntaxHighlightJS("return'foo';");
15 dumpSyntaxHighlightJS("/\\\//g");
16 dumpSyntaxHighlightJS("//ig';");
17 dumpSyntaxHighlightJS("1 / 2 + /a/.test('a');");
18 dumpSyntaxHighlightJS("\"\\\"/\".length / 2");
19 dumpSyntaxHighlightJS("var foo = 1/*/***//2");
20 dumpSyntaxHighlightJS("/*comment*//.*/.test('a')");
21 dumpSyntaxHighlightJS("'f\\\noo';");
22 dumpSyntaxHighlightJS("'\\f\\b\\t';");
23 dumpSyntaxHighlightJS("'/\\\n/';");
24 dumpSyntaxHighlightJS("foo/**\n/\n*/foo");
25 dumpSyntaxHighlightJS("{0: true}");
26 dumpSyntaxHighlightJS("var toString;");
27 dumpSyntaxHighlightJS("var foo = undefined;");
28 dumpSyntaxHighlightJS("var foo = Infinity;");
29 dumpSyntaxHighlightJS("var foo = NaN;")
31 .then(InspectorTest
.completeTest
.bind(InspectorTest
));
37 <body onload=
"runTest()">
39 Tests that JavaScriptSourceSyntaxHighlighter detects the tokens.