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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/compiler-script-mapping-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/inspector/compiler-script-mapping.html
diff --git a/LayoutTests/http/tests/inspector/compiler-script-mapping.html b/LayoutTests/http/tests/inspector/compiler-script-mapping.html
index 72ce9e3986d5f91d55df1549e43ae06df4460995..2ad929fcd07c8d8b9c99f8a786e444bfe37be240 100644
--- a/LayoutTests/http/tests/inspector/compiler-script-mapping.html
+++ b/LayoutTests/http/tests/inspector/compiler-script-mapping.html
@@ -328,7 +328,36 @@ function test()
var uiLocation = script.rawLocationToUILocation(0, 0);
InspectorTest.addResult(uiLocation.uiSourceCode.originURL());
next();
- }
+ },
+
+ function testSourceRoot(next)
+ {
+ /*
+ example.js:
+ 0 1 2 3
+ 012345678901234567890123456789012345
+ function add(variable_x, variable_y)
+ {
+ return variable_x + variable_y;
+ }
+
+ var global = "foo";
+ ----------------------------------------
+ example-compiled.js:
+ 0 1 2 3
+ 012345678901234567890123456789012345
+ function add(a,b){return a+b}var global="foo";
+ */
+ var mappingPayload = {
+ "mappings":"AAASA,QAAAA,IAAG,CAACC,CAAD,CAAaC,CAAb,CACZ,CACI,MAAOD,EAAP,CAAoBC,CADxB,CAIA,IAAIC,OAAS;",
+ "sources":["example.js"],
+ "sourceRoot":"/"
+ };
+ var mapping = new WebInspector.SourceMap("source-map.json", mappingPayload);
+ checkMapping(0, 9, "/example.js", 0, 9, mapping);
+ checkReverseMapping(0, 0, "/example.js", 0, mapping);
+ next();
+ },
]);
};
« 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