| Index: tools/testing/dart/browser_test.dart
|
| diff --git a/tools/testing/dart/browser_test.dart b/tools/testing/dart/browser_test.dart
|
| index f7dccc21a67413fcdbd9fab73b482d8108aec445..7b52bc13fad639d3da8a14977785787ba0e13ad3 100644
|
| --- a/tools/testing/dart/browser_test.dart
|
| +++ b/tools/testing/dart/browser_test.dart
|
| @@ -27,35 +27,18 @@ String GetHtmlContents(String title,
|
| </html>
|
| """;
|
|
|
| -/**
|
| - * Returns the native [path] converted for use in a URI.
|
| - */
|
| -nativePathToUri(String path) {
|
| - // This regexp matches Windows-like file names. Strictly speaking,
|
| - // this prevents us from having a file named a:something on Linux,
|
| - // but since this wrapping is a hack in the first place, it seems
|
| - // better to exercise this path on all architectures.
|
| - final re = const RegExp('^[a-z]:', ignoreCase: true);
|
| - if (re.hasMatch(path)) {
|
| - path = '/$path';
|
| - }
|
| - return path.replaceAll('\\', '/');
|
| -}
|
| -
|
| -String WrapDartTestInLibrary(String test) =>
|
| +String WrapDartTestInLibrary(Path test) =>
|
| """
|
| #library('libraryWrapper');
|
| -#source('${nativePathToUri(test)}');
|
| +#source('$test');
|
| """;
|
|
|
| -String DartTestWrapper(String dartHome, String library) {
|
| - dartHome = nativePathToUri(dartHome);
|
| - library = nativePathToUri(library);
|
| +String DartTestWrapper(Path dartHome, Path library) {
|
| return """
|
| #library('test');
|
|
|
| -#import('${dartHome}/lib/unittest/unittest.dart', prefix: 'unittest');
|
| -#import('${dartHome}/lib/unittest/html_config.dart', prefix: 'config');
|
| +#import('${dartHome.append('lib/unittest/unittest.dart')}, prefix: 'unittest');
|
| +#import('${dartHome.append('lib/unittest/html_config.dart')}, prefix: 'config');
|
|
|
| #import('${library}', prefix: "Test");
|
|
|
|
|