OLD | NEW |
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 Loading... |
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> |
OLD | NEW |