Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / pretty-print-javascript-6.html
blob29237ce7642c0d7b91293edfca8a2ff31f63bc3c
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/debugger-test.js"></script>
5 <script src="../../http/tests/inspector/sources-test.js"></script>
6 <script src="debugger/resources/obfuscated.js"></script>
8 <script>
10 function test()
12 var testJSFormatter = InspectorTest.testPrettyPrint.bind(InspectorTest, "text/javascript");
14 InspectorTest.runTestSuite([
15 function trailingCommentsTest(next)
17 var mappingQueries = [];
18 testJSFormatter("noop(); //#sourceMappingURL=program.js.map", mappingQueries, next);
21 function inlinedScriptFormatting(next)
23 var content = "<html><body><script>function f(){}<" + "/script><script>function g(){var a;window.return = 10;if (a) return;}<" + "/script></body></html>";
24 InspectorTest.testPrettyPrint("text/html", content, [], next);
27 function generatorFormatter(next)
29 var mappingQueries = ["max", "*", "else"];
30 testJSFormatter("function *max(){var a=yield;var b=yield 10;if(a>b)return a;else return b;}", mappingQueries, next);
33 function blockCommentFormatter(next)
35 var mappingQueries = ["this", "is", "block", "comment", "var", "10"];
36 testJSFormatter("/** this\n * is\n * block\n * comment\n */\nvar a=10;", mappingQueries, next);
39 function lexicalScoping(next)
41 var mappingQueries = ["for", "person", "name", "}"];
42 testJSFormatter("for(var i=0;i<names.length;++i){let name=names[i];let person=persons[i];}", mappingQueries, next);
45 function anonimousFunctionAsParameter(next)
47 var mappingQueries = ["setTimeout", "function", "alert", "2000"];
48 testJSFormatter("setTimeout(function(){alert(1);},2000);", mappingQueries, next);
50 ]);
53 </script>
55 </head>
57 <body onload="runTest()">
58 <p>Verifies JavaScript pretty-printing functionality.</p>
59 </body>
60 </html>