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

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

Issue 13898010: Fix the way sourceRoot is resolved in source maps. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: git cl dcommit --bypass-hooks Created 7 years, 8 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 } 321 }
322 322
323 function originalUISourceCodeAdded(uiSourceCode) { } 323 function originalUISourceCodeAdded(uiSourceCode) { }
324 324
325 script.sourceMapURL = "http://localhost:8000/inspector/resources/sou rce-map.json_"; 325 script.sourceMapURL = "http://localhost:8000/inspector/resources/sou rce-map.json_";
326 console.error = function() {}; // Error message is platform dependen t. 326 console.error = function() {}; // Error message is platform dependen t.
327 debuggerScriptMapping._parsedScriptSource({data:script}); 327 debuggerScriptMapping._parsedScriptSource({data:script});
328 var uiLocation = script.rawLocationToUILocation(0, 0); 328 var uiLocation = script.rawLocationToUILocation(0, 0);
329 InspectorTest.addResult(uiLocation.uiSourceCode.originURL()); 329 InspectorTest.addResult(uiLocation.uiSourceCode.originURL());
330 next(); 330 next();
331 } 331 },
332
333 function testSourceRoot(next)
334 {
335 /*
336 example.js:
337 0 1 2 3
338 012345678901234567890123456789012345
339 function add(variable_x, variable_y)
340 {
341 return variable_x + variable_y;
342 }
343
344 var global = "foo";
345 ----------------------------------------
346 example-compiled.js:
347 0 1 2 3
348 012345678901234567890123456789012345
349 function add(a,b){return a+b}var global="foo";
350 */
351 var mappingPayload = {
352 "mappings":"AAASA,QAAAA,IAAG,CAACC,CAAD,CAAaC,CAAb,CACZ,CACI,MAA OD,EAAP,CAAoBC,CADxB,CAIA,IAAIC,OAAS;",
353 "sources":["example.js"],
354 "sourceRoot":"/"
355 };
356 var mapping = new WebInspector.SourceMap("source-map.json", mappingP ayload);
357 checkMapping(0, 9, "/example.js", 0, 9, mapping);
358 checkReverseMapping(0, 0, "/example.js", 0, mapping);
359 next();
360 },
332 ]); 361 ]);
333 }; 362 };
334 363
335 </script> 364 </script>
336 365
337 </head> 366 </head>
338 367
339 <body onload="runTest()"> 368 <body onload="runTest()">
340 <p>Tests SourceMap and CompilerScriptMapping.</p> 369 <p>Tests SourceMap and CompilerScriptMapping.</p>
341 </body> 370 </body>
342 </html> 371 </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