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

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

Issue 13191011: Be more careful about converting between file URIs and paths. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « pkg/stack_trace/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: 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 2cbe48d12ea9a0a4f7a133613bd538ca42914578..ed8fa6b034305d7302b0cfc879075997142735ec 100644
--- a/pkg/stack_trace/test/trace_test.dart
+++ b/pkg/stack_trace/test/trace_test.dart
@@ -8,6 +8,7 @@ import 'dart:io';
import 'dart:uri';
import 'package:pathos/path.dart' as path;
+import 'package:stack_trace/src/utils.dart';
import 'package:stack_trace/stack_trace.dart';
import 'package:unittest/unittest.dart';
@@ -91,7 +92,7 @@ void main() {
});
test('.toString() nicely formats the stack trace', () {
- var uri = _pathToFileUri(path.join('foo', 'bar.dart'));
+ var uri = pathToFileUri(path.join('foo', 'bar.dart'));
var trace = new Trace.parse('''
#0 Foo._bar ($uri:42:21)
#1 zip.<anonymous closure>.zap (dart:async:0:2)
@@ -133,9 +134,3 @@ dart:async bottom
'''));
});
}
-
-String _pathToFileUri(String pathString) {
- pathString = path.absolute(pathString);
- if (Platform.operatingSystem != 'windows') return 'file://$pathString';
- return 'file:///${pathString.replaceAll("\\", "/")}';
-}
« no previous file with comments | « pkg/stack_trace/test/frame_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698