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

Unified Diff: tests/standalone/io/platform_test.dart

Issue 1529063006: - Implement Platform.packageRoot and Platform.packageConfig based (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
Index: tests/standalone/io/platform_test.dart
diff --git a/tests/standalone/io/platform_test.dart b/tests/standalone/io/platform_test.dart
index f07475061da1081074421882db52acabbd972dcf..308d5d013c01df9f3f2ce91a8014d4ebfcd65868 100644
--- a/tests/standalone/io/platform_test.dart
+++ b/tests/standalone/io/platform_test.dart
@@ -48,11 +48,20 @@ test() {
Expect.isTrue(Platform.script.toFilePath().startsWith(oldDir.path));
// Restore dir.
Directory.current = oldDir;
- Directory packageRoot = new Directory(Platform.packageRoot);
+ var pkgRootString = Platform.packageRoot;
+ Directory packageRoot = new Directory.fromUri(Uri.parse(pkgRootString));
Expect.isTrue(packageRoot.existsSync());
Expect.isTrue(new Directory("${packageRoot.path}/expect").existsSync());
Expect.isTrue(Platform.executableArguments.any(
- (arg) => arg.contains(Platform.packageRoot)));
+ (arg) {
+ if (!arg.startsWith("--package-root=")) {
+ return false;
+ }
+ // Cut out the '--package-root=' prefix.
+ arg = arg.substring(15);
+ return pkgRootString.contains(arg);
+ }
+ ));
}
void f(reply) {

Powered by Google App Engine
This is Rietveld 408576698