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

Unified Diff: test/source_map_stack_trace_test.dart

Issue 1108053006: Don't crash when mapping stack chains. (Closed) Base URL: git@github.com:dart-lang/source_map_stack_trace.git@master
Patch Set: Created 5 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 | « pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/source_map_stack_trace_test.dart
diff --git a/test/source_map_stack_trace_test.dart b/test/source_map_stack_trace_test.dart
index 432b6166759d6d3fc89bdee80e3cf36af8048877..ffaaaee04d2b48c1b1b593ba5429c4d6ddf14b14 100644
--- a/test/source_map_stack_trace_test.dart
+++ b/test/source_map_stack_trace_test.dart
@@ -122,6 +122,26 @@ foo.dart.js 10:11 baz
expect(frame.column, equals(4));
});
+ test("converts a stack chain", () {
+ var trace = new Chain([
+ new Trace.parse("foo.dart.js 10:11 foo"),
+ new Trace.parse("foo.dart.js 10:11 bar")
+ ]);
+ var traces = mapStackTrace(_simpleMapping, trace).traces;
+
+ var frame = traces.first.frames.single;
+ expect(frame.uri, equals(Uri.parse("foo.dart")));
+ expect(frame.member, equals("foo"));
+ expect(frame.line, equals(2));
+ expect(frame.column, equals(4));
+
+ frame = traces.last.frames.single;
+ expect(frame.uri, equals(Uri.parse("foo.dart")));
+ expect(frame.member, equals("bar"));
+ expect(frame.line, equals(2));
+ expect(frame.column, equals(4));
+ });
+
group("cleans up", () {
test("Firefox junk", () {
expect(_prettify("foo/<"), equals("foo"));
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698