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

Side by Side Diff: LayoutTests/http/tests/inspector/compiler-script-mapping.html

Issue 364853002: DevTools: Fix the way source map treats single field segment in the very end of mappings. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/compiler-script-mapping-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="inspector-test.js"></script> 3 <script src="inspector-test.js"></script>
4 <script src="debugger-test.js"></script> 4 <script src="debugger-test.js"></script>
5 <script src="workspace-test.js"></script> 5 <script src="workspace-test.js"></script>
6 6
7 <script> 7 <script>
8 8
9 function test() 9 function test()
10 { 10 {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 { 46 {
47 return variable_x + variable_y; 47 return variable_x + variable_y;
48 } 48 }
49 49
50 var global = "foo"; 50 var global = "foo";
51 ---------------------------------------- 51 ----------------------------------------
52 example-compiled.js: 52 example-compiled.js:
53 0 1 2 3 53 0 1 2 3
54 012345678901234567890123456789012345 54 012345678901234567890123456789012345
55 function add(a,b){return a+b}var global="foo"; 55 function add(a,b){return a+b}var global="foo";
56 foo
56 */ 57 */
57 var mappingPayload = { 58 var mappingPayload = {
58 "mappings":"AAASA,QAAAA,IAAG,CAACC,CAAD,CAAaC,CAAb,CACZ,CACI,MAA OD,EAAP,CAAoBC,CADxB,CAIA,IAAIC,OAAS;", 59 "mappings":"AAASA,QAAAA,IAAG,CAACC,CAAD,CAAaC,CAAb,CACZ,CACI,MAA OD,EAAP,CAAoBC,CADxB,CAIA,IAAIC,OAAS;A",
59 "sources":["example.js"] 60 "sources":["example.js"]
60 }; 61 };
61 var mapping = new WebInspector.SourceMap("source-map.json", mappingP ayload); 62 var mapping = new WebInspector.SourceMap("source-map.json", mappingP ayload);
62 63
63 checkMapping(0, 9, "example.js", 0, 9, mapping); 64 checkMapping(0, 9, "example.js", 0, 9, mapping);
64 checkMapping(0, 13, "example.js", 0, 13, mapping); 65 checkMapping(0, 13, "example.js", 0, 13, mapping);
65 checkMapping(0, 15, "example.js", 0, 25, mapping); 66 checkMapping(0, 15, "example.js", 0, 25, mapping);
66 checkMapping(0, 18, "example.js", 2, 4, mapping); 67 checkMapping(0, 18, "example.js", 2, 4, mapping);
67 checkMapping(0, 25, "example.js", 2, 11, mapping); 68 checkMapping(0, 25, "example.js", 2, 11, mapping);
68 checkMapping(0, 27, "example.js", 2, 24, mapping); 69 checkMapping(0, 27, "example.js", 2, 24, mapping);
70 checkMapping(1, 0, undefined, undefined, undefined, mapping);
69 71
70 checkReverseMapping(0, 0, "example.js", 0, mapping); 72 checkReverseMapping(0, 0, "example.js", 0, mapping);
71 checkReverseMapping(0, 17, "example.js", 1, mapping); 73 checkReverseMapping(0, 17, "example.js", 1, mapping);
72 checkReverseMapping(0, 18, "example.js", 2, mapping); 74 checkReverseMapping(0, 18, "example.js", 2, mapping);
73 checkReverseMapping(0, 29, "example.js", 4, mapping); 75 checkReverseMapping(0, 29, "example.js", 4, mapping);
74 checkReverseMapping(0, 29, "example.js", 5, mapping); 76 checkReverseMapping(0, 29, "example.js", 5, mapping);
75 77
76 next(); 78 next();
77 }, 79 },
78 80
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 }; 422 };
421 423
422 </script> 424 </script>
423 425
424 </head> 426 </head>
425 427
426 <body onload="runTest()"> 428 <body onload="runTest()">
427 <p>Tests SourceMap and CompilerScriptMapping.</p> 429 <p>Tests SourceMap and CompilerScriptMapping.</p>
428 </body> 430 </body>
429 </html> 431 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/compiler-script-mapping-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698