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

Unified Diff: test/trace_test.dart

Issue 2739643004: Fix friendly frame parsing bugs. (Closed)
Patch Set: Fix friendly frame parsing bugs. Created 3 years, 9 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 | « test/frame_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/trace_test.dart
diff --git a/test/trace_test.dart b/test/trace_test.dart
index 077f1baeda9a6f1eb59c02374e9c664eae75506a..327eff065472ea4961aff1eb175fcfb3a124d695 100644
--- a/test/trace_test.dart
+++ b/test/trace_test.dart
@@ -72,6 +72,23 @@ 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'
+ ' 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 (anonymous function).zip.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[1].member, equals("<fn>"));
+ expect(trace.frames[2].uri,
+ equals(Uri.parse("http://pub.dartlang.org/thing.js")));
+ expect(trace.frames[2].member, equals("<fn>.zip.zap"));
});
// JavaScriptCore traces are just like V8, except that it doesn't have a
« no previous file with comments | « test/frame_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698