Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1084)

Side by Side Diff: LayoutTests/inspector/sources/pretty-print-javascript-6.html

Issue 1125143004: DevTools: [PrettyPrint] support template literals in pretty-printing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix test Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/debugger-test.js"></script> 4 <script src="../../http/tests/inspector/debugger-test.js"></script>
5 <script src="../../http/tests/inspector/sources-test.js"></script> 5 <script src="../../http/tests/inspector/sources-test.js"></script>
6 <script src="debugger/resources/obfuscated.js"></script> 6 <script src="debugger/resources/obfuscated.js"></script>
7 7
8 <script> 8 <script>
9 9
10 function test() 10 function test()
11 { 11 {
12 var testJSFormatter = InspectorTest.testPrettyPrint.bind(InspectorTest, "tex t/javascript"); 12 var testJSFormatter = InspectorTest.testPrettyPrint.bind(InspectorTest, "tex t/javascript");
13 13
14 InspectorTest.runTestSuite([ 14 InspectorTest.runTestSuite([
15 function trailingCommentsTest(next) 15 function trailingCommentsTest(next)
16 { 16 {
17 var mappingQueries = []; 17 var mappingQueries = [];
18 testJSFormatter("noop(); //#sourceMappingURL=program.js.map", mappin gQueries, next); 18 testJSFormatter("noop(); //#sourceMappingURL=program.js.map", mappin gQueries, next);
19 }, 19 },
20 20
21 function inlinedScriptFormatting(next) 21 function inlinedScriptFormatting(next)
22 { 22 {
23 var content = "<html><body><script>function f(){}<" + "/script><scri pt>function g(){var a;window.return = 10;if (a) return;}<" + "/script></body></h tml>"; 23 var content = "<html><body><script>function f(){}<" + "/script><scri pt>function g(){var a;window.return = 10;if (a) return;}<" + "/script></body></h tml>";
24 InspectorTest.testPrettyPrint("text/html", content, [], next); 24 InspectorTest.testPrettyPrint("text/html", content, [], next);
25 }, 25 },
26 26
27 function generatorFormatter(next) 27 function generatorFormatter(next)
28 { 28 {
29 var mappingQueries = ["max", "*", "else"]; 29 var mappingQueries = ["max", "*", "else"];
30 testJSFormatter("function *max(){ var a = yield; var b = yield; if ( a > b) return a; else return b;}", mappingQueries, next); 30 testJSFormatter("function *max(){var a=yield;var b=yield 10;if(a>b)r eturn a;else return b;}", mappingQueries, next);
31 }, 31 },
32 32
33 function blockCommentFormatter(next) 33 function blockCommentFormatter(next)
34 { 34 {
35 var mappingQueries = ["this", "is", "block", "comment", "var", "10"] ; 35 var mappingQueries = ["this", "is", "block", "comment", "var", "10"] ;
36 testJSFormatter("/** this\n * is\n * block\n * comment\n */\nvar a=1 0;", mappingQueries, next); 36 testJSFormatter("/** this\n * is\n * block\n * comment\n */\nvar a=1 0;", mappingQueries, next);
37 } 37 }
38 ]); 38 ]);
39 } 39 }
40 40
41 </script> 41 </script>
42 42
43 </head> 43 </head>
44 44
45 <body onload="runTest()"> 45 <body onload="runTest()">
46 <p>Verifies JavaScript pretty-printing functionality.</p> 46 <p>Verifies JavaScript pretty-printing functionality.</p>
47 </body> 47 </body>
48 </html> 48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698