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

Unified Diff: tools/testing/dart/browser_test.dart

Issue 11645057: Don't use relativeTo() since it barfs on some arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/browser_test.dart
diff --git a/tools/testing/dart/browser_test.dart b/tools/testing/dart/browser_test.dart
index 619b8c70fc5fbca4f9a8dad843d6b2e1c5695c1f..b47bbf8ed1faefbd0dbe5688cee465c19b686262 100644
--- a/tools/testing/dart/browser_test.dart
+++ b/tools/testing/dart/browser_test.dart
@@ -58,7 +58,12 @@ String dartTestWrapper(Path dartHome, Path library) {
// Tests inside "pkg" import unittest using "package:". All others use a
// relative path. The imports need to agree, so use a matching form here.
var unitTest = dartHome.append("pkg/unittest/lib").toString();
- if (library.relativeTo(dartHome).segments().contains("pkg")) {
+
+ // TODO(rnystrom): Looking in the entire path here is wrong. It should only
+ // consider the relative path within dartHome. Unfortunately,
+ // Path.relativeTo() does not handle cases where library is already a relative
+ // path, and Path.isAbsolute does not work on Windows.
+ if (library.segments().contains("pkg")) {
unitTest = 'package:unittest';
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698