Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / pretty-print-javascript-template-literals.html
blobb4d55e61bbdb4d0a0a10f07ba7f6582d2658c2bf
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 simpleLiteral(next)
17 var mappingQueries = ["foo", "bar"];
18 testJSFormatter("var foo = `bar`;", mappingQueries, next);
21 function multilineLiteral(next)
23 var mappingQueries = ["foo", "bar"];
24 testJSFormatter("var foo = `this\nbar`;", mappingQueries, next);
27 function stringSubstitution(next)
29 var mappingQueries = ["credit", "cash"];
30 testJSFormatter("var a=`I have ${credit+cash}$`;", mappingQueries, next);
33 function multipleStringSubstitution(next)
35 var mappingQueries = ["credit", "cash"];
36 testJSFormatter("var a=`${name} has ${credit+cash}${currency?currency:\"$\"}`;", mappingQueries, next);
39 function taggedTemplate(next)
41 var mappingQueries = ["escapeHtml", "width"];
42 testJSFormatter("escapeHtml`<div class=${classnName} width=${a+b}/>`;", mappingQueries, next);
45 function escapedApostrophe(next)
47 var mappingQueries = ["That", "great"];
48 testJSFormatter("var a=`That\`s great!`;", mappingQueries, next);
50 ]);
53 </script>
55 </head>
57 <body onload="runTest()">
58 <p>Verifies JavaScript pretty-printing functionality.</p>
59 </body>
60 </html>