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

Unified Diff: pkg/stack_trace/test/trace_test.dart

Issue 23159007: Properly parse V8 stack traces that contain the exception description. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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/stack_trace/lib/src/trace.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/stack_trace/test/trace_test.dart
diff --git a/pkg/stack_trace/test/trace_test.dart b/pkg/stack_trace/test/trace_test.dart
index 92b2b20840b1aaadb61e2f46a8efe36128ab6daf..f185d797163d198c93dd6c22f18e66b0b2ac40c1 100644
--- a/pkg/stack_trace/test/trace_test.dart
+++ b/pkg/stack_trace/test/trace_test.dart
@@ -61,6 +61,35 @@ void main() {
equals(Uri.parse("http://pub.dartlang.org/stuff.js")));
expect(trace.frames[2].uri,
equals(Uri.parse("http://pub.dartlang.org/thing.js")));
+
+ trace = new Trace.parse(
+ "Exception: foo\n"
+ ' at Foo._bar (http://pub.dartlang.org/stuff.js:42:21)\n'
+ ' at http://pub.dartlang.org/stuff.js:0:2\n'
+ ' at zip.<anonymous>.zap '
+ '(http://pub.dartlang.org/thing.js:1:100)');
+
+ expect(trace.frames[0].uri,
+ equals(Uri.parse("http://pub.dartlang.org/stuff.js")));
+ expect(trace.frames[1].uri,
+ equals(Uri.parse("http://pub.dartlang.org/stuff.js")));
+ expect(trace.frames[2].uri,
+ equals(Uri.parse("http://pub.dartlang.org/thing.js")));
+
+ trace = new Trace.parse(
+ 'Exception: foo\n'
+ ' bar\n'
+ ' at Foo._bar (http://pub.dartlang.org/stuff.js:42:21)\n'
+ ' at http://pub.dartlang.org/stuff.js:0:2\n'
+ ' at zip.<anonymous>.zap '
+ '(http://pub.dartlang.org/thing.js:1:100)');
+
+ expect(trace.frames[0].uri,
+ equals(Uri.parse("http://pub.dartlang.org/stuff.js")));
+ expect(trace.frames[1].uri,
+ equals(Uri.parse("http://pub.dartlang.org/stuff.js")));
+ expect(trace.frames[2].uri,
+ equals(Uri.parse("http://pub.dartlang.org/thing.js")));
});
test('parses a Firefox stack trace correctly', () {
« no previous file with comments | « pkg/stack_trace/lib/src/trace.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698