Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / pretty-print-javascript-2.html
blobb6734cadeb574e107f9fdbfacaedee9315e9f474
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 forLoopWithIfStatementWithoutBlockStatements(next)
17 var mappingQueries = ["length","console","of"];
18 testJSFormatter("for(var value of map)if (value.length%3===0)console.log(value);", mappingQueries, next);
21 function objectExpressionProperties(next)
23 var mappingQueries = ["mapping", "original", "formatted"];
24 testJSFormatter("var mapping={original:[1,2,3],formatted:[],count:0}", mappingQueries, next);
27 function blockFormatting(next)
29 var mappingQueries = ["(1)", "(2)"];
30 testJSFormatter("{ print(1); print(2); }", mappingQueries, next);
33 function assignmentFormatting(next)
35 var mappingQueries = ["string"];
36 testJSFormatter("var exp='a string';c=+a+(0>a?b:0);c=(1);var a=(1);", mappingQueries, next);
39 function objectLiteralFormatting(next)
41 var mappingQueries = [
42 "dog",
43 "1989",
44 "foo"
46 testJSFormatter("var obj={'foo':1,bar:\"2\",cat:{dog:'1989'}}", mappingQueries, next);
48 ]);
51 </script>
53 </head>
55 <body onload="runTest()">
56 <p>Verifies JavaScript pretty-printing functionality.</p>
57 </body>
58 </html>