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

Side by Side Diff: pkg/stack_trace/test/frame_test.dart

Issue 197283039: Support IE10 stack traces in pkg/stack_trace. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/stack_trace/lib/src/frame.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library frame_test; 5 library frame_test;
6 6
7 import 'package:path/path.dart' as path; 7 import 'package:path/path.dart' as path;
8 import 'package:stack_trace/stack_trace.dart'; 8 import 'package:stack_trace/stack_trace.dart';
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 10
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 test('parses a basic eval stack frame correctly', () { 170 test('parses a basic eval stack frame correctly', () {
171 var frame = new Frame.parseV8(" at eval (eval at <anonymous> " 171 var frame = new Frame.parseV8(" at eval (eval at <anonymous> "
172 "(http://pub.dartlang.org/stuff.dart.js:560:28))"); 172 "(http://pub.dartlang.org/stuff.dart.js:560:28))");
173 expect(frame.uri, 173 expect(frame.uri,
174 equals(Uri.parse("http://pub.dartlang.org/stuff.dart.js"))); 174 equals(Uri.parse("http://pub.dartlang.org/stuff.dart.js")));
175 expect(frame.line, equals(560)); 175 expect(frame.line, equals(560));
176 expect(frame.column, equals(28)); 176 expect(frame.column, equals(28));
177 expect(frame.member, equals('eval')); 177 expect(frame.member, equals('eval'));
178 }); 178 });
179 179
180 test('parses an IE10 eval stack frame correctly', () {
181 var frame = new Frame.parseV8(" at eval (eval at Anonymous function "
182 "(http://pub.dartlang.org/stuff.dart.js:560:28))");
183 expect(frame.uri,
184 equals(Uri.parse("http://pub.dartlang.org/stuff.dart.js")));
185 expect(frame.line, equals(560));
186 expect(frame.column, equals(28));
187 expect(frame.member, equals('eval'));
188 });
189
180 test('parses an eval stack frame with inner position info correctly', () { 190 test('parses an eval stack frame with inner position info correctly', () {
181 var frame = new Frame.parseV8(" at eval (eval at <anonymous> " 191 var frame = new Frame.parseV8(" at eval (eval at <anonymous> "
182 "(http://pub.dartlang.org/stuff.dart.js:560:28), <anonymous>:3:28)"); 192 "(http://pub.dartlang.org/stuff.dart.js:560:28), <anonymous>:3:28)");
183 expect(frame.uri, 193 expect(frame.uri,
184 equals(Uri.parse("http://pub.dartlang.org/stuff.dart.js"))); 194 equals(Uri.parse("http://pub.dartlang.org/stuff.dart.js")));
185 expect(frame.line, equals(560)); 195 expect(frame.line, equals(560));
186 expect(frame.column, equals(28)); 196 expect(frame.column, equals(28));
187 expect(frame.member, equals('eval')); 197 expect(frame.member, equals('eval'));
188 }); 198 });
189 199
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 equals('dart:core/uri.dart 5 in Foo')); 554 equals('dart:core/uri.dart 5 in Foo'));
545 }); 555 });
546 556
547 test('prints relative paths as relative', () { 557 test('prints relative paths as relative', () {
548 var relative = path.normalize('relative/path/to/foo.dart'); 558 var relative = path.normalize('relative/path/to/foo.dart');
549 expect(new Frame.parseFriendly('$relative 5:10 Foo').toString(), 559 expect(new Frame.parseFriendly('$relative 5:10 Foo').toString(),
550 equals('$relative 5:10 in Foo')); 560 equals('$relative 5:10 in Foo'));
551 }); 561 });
552 }); 562 });
553 } 563 }
OLDNEW
« no previous file with comments | « pkg/stack_trace/lib/src/frame.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698