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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/text-source-map.html

Issue 2857453002: DevTools: support resolving a UILocation to multiple raw script locations (Closed)
Patch Set: get rid of uniqueScriptId() Created 3 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
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 5
6 <script> 6 <script>
7 7
8 function test() 8 function test()
9 { 9 {
10 function checkMapping(compiledLineNumber, compiledColumnNumber, sourceURL, s ourceLineNumber, sourceColumnNumber, mapping) 10 function checkMapping(compiledLineNumber, compiledColumnNumber, sourceURL, s ourceLineNumber, sourceColumnNumber, mapping)
11 { 11 {
12 var entry = mapping.findEntry(compiledLineNumber, compiledColumnNumber); 12 var entry = mapping.findEntry(compiledLineNumber, compiledColumnNumber);
13 InspectorTest.addResult(sourceURL + " === " + entry.sourceURL); 13 InspectorTest.addResult(sourceURL + " === " + entry.sourceURL);
14 InspectorTest.addResult(sourceLineNumber + " === " + entry.sourceLineNum ber); 14 InspectorTest.addResult(sourceLineNumber + " === " + entry.sourceLineNum ber);
15 InspectorTest.addResult(sourceColumnNumber + " === " + entry.sourceColum nNumber); 15 InspectorTest.addResult(sourceColumnNumber + " === " + entry.sourceColum nNumber);
16 } 16 }
17 17
18 function checkReverseMapping(compiledLineNumber, compiledColumnNumber, sourc eURL, sourceLineNumber, mapping) 18 function checkReverseMapping(compiledLineNumber, compiledColumnNumber, sourc eURL, sourceLineNumber, mapping)
19 { 19 {
20 var entry = mapping.firstSourceLineMapping(sourceURL, sourceLineNumber); 20 var mappings = mapping.mappingsForLine(sourceURL, sourceLineNumber);
21 if (!entry) { 21 if (!mappings.length) {
22 InspectorTest.addResult("source line " + sourceLineNumber + " has no mappings."); 22 InspectorTest.addResult("source line " + sourceLineNumber + " has no mappings.");
23 return; 23 return;
24 } 24 }
25 InspectorTest.addResult(compiledLineNumber + " === " + entry.lineNumber) ; 25 InspectorTest.addResult(compiledLineNumber + " === " + mappings[0].lineN umber);
26 InspectorTest.addResult(compiledColumnNumber + " === " + entry.columnNum ber); 26 InspectorTest.addResult(compiledColumnNumber + " === " + mappings[0].col umnNumber);
27 } 27 }
28 28
29 InspectorTest.runTestSuite([ 29 InspectorTest.runTestSuite([
30 function testSimpleMap(next) 30 function testSimpleMap(next)
31 { 31 {
32 /* 32 /*
33 example.js: 33 example.js:
34 0 1 2 3 34 0 1 2 3
35 012345678901234567890123456789012345 35 012345678901234567890123456789012345
36 function add(variable_x, variable_y) 36 function add(variable_x, variable_y)
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 }; 232 };
233 233
234 </script> 234 </script>
235 235
236 </head> 236 </head>
237 237
238 <body onload="runTest()"> 238 <body onload="runTest()">
239 <p>Verify TextSourceMap implementation</p> 239 <p>Verify TextSourceMap implementation</p>
240 </body> 240 </body>
241 </html> 241 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698