3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script src="syntax-highlight.js"></script>
9 function dumpSyntaxHighlightJS(str)
11 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;");
28 InspectorTest.completeTest();
34 <body onload="runTest()">
36 Tests that JavaScriptSourceSyntaxHighlighter detects the tokens.