OLD | NEW |
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() |
(...skipping 28 matching lines...) Expand all Loading... |
39 function lexicalScoping(next) | 39 function lexicalScoping(next) |
40 { | 40 { |
41 var mappingQueries = ["for", "person", "name", "}"]; | 41 var mappingQueries = ["for", "person", "name", "}"]; |
42 testJSFormatter("for(var i=0;i<names.length;++i){let name=names[i];l
et person=persons[i];}", mappingQueries, next); | 42 testJSFormatter("for(var i=0;i<names.length;++i){let name=names[i];l
et person=persons[i];}", mappingQueries, next); |
43 }, | 43 }, |
44 | 44 |
45 function anonimousFunctionAsParameter(next) | 45 function anonimousFunctionAsParameter(next) |
46 { | 46 { |
47 var mappingQueries = ["setTimeout", "function", "alert", "2000"]; | 47 var mappingQueries = ["setTimeout", "function", "alert", "2000"]; |
48 testJSFormatter("setTimeout(function(){alert(1);},2000);", mappingQu
eries, next); | 48 testJSFormatter("setTimeout(function(){alert(1);},2000);", mappingQu
eries, next); |
| 49 }, |
| 50 |
| 51 function arrowFunction(next) |
| 52 { |
| 53 var mappingQueries = ["function", "console", "=>", "2"]; |
| 54 testJSFormatter("function test(arg){console.log(arg);}test(a=>a+2);"
, mappingQueries, next); |
49 } | 55 } |
50 ]); | 56 ]); |
51 } | 57 } |
52 | 58 |
53 </script> | 59 </script> |
54 | 60 |
55 </head> | 61 </head> |
56 | 62 |
57 <body onload="runTest()"> | 63 <body onload="runTest()"> |
58 <p>Verifies JavaScript pretty-printing functionality.</p> | 64 <p>Verifies JavaScript pretty-printing functionality.</p> |
59 </body> | 65 </body> |
60 </html> | 66 </html> |
OLD | NEW |