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

Unified Diff: pkg/source_maps/test/parser_test.dart

Issue 383823002: Adding support for `sourceRoot` to the SingleMapping class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use string interpolation for concat rather than '+'. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/source_maps/lib/parser.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/source_maps/test/parser_test.dart
diff --git a/pkg/source_maps/test/parser_test.dart b/pkg/source_maps/test/parser_test.dart
index 8f1be3dc5c710ffa67160f25bf6e5ff0c1b8f44e..62cd08f1f3700df8bef12c1d28d0043e0ed4d81c 100644
--- a/pkg/source_maps/test/parser_test.dart
+++ b/pkg/source_maps/test/parser_test.dart
@@ -100,6 +100,20 @@ main() {
expect(entry.sourceNameId, 0);
});
+ test('parse with source root', () {
+ var inputMap = new Map.from(MAP_WITH_SOURCE_LOCATION);
+ inputMap['sourceRoot'] = '/pkg/';
+ var mapping = parseJson(inputMap);
+ expect(mapping.spanFor(0, 0).sourceUrl, "/pkg/input.dart");
+
+ var newSourceRoot = '/new/';
+
+ mapping.sourceRoot = newSourceRoot;
+ inputMap["sourceRoot"] = newSourceRoot;
+
+ expect(mapping.toJson(), equals(inputMap));
+ });
+
test('parse and re-emit', () {
for (var expected in [
EXPECTED_MAP,
« no previous file with comments | « pkg/source_maps/lib/parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698