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

Unified Diff: tests/standalone/http_launch_test.dart

Issue 52723007: Revert "Change dart:io Platform.script to return a Uri." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « tests/standalone/debugger/debug_lib.dart ('k') | tests/standalone/io/code_collection_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/http_launch_test.dart
diff --git a/tests/standalone/http_launch_test.dart b/tests/standalone/http_launch_test.dart
index 5404f0ff5877ded9fb45747b0c8a6c7c3ad29dc9..cebab776a592069a5923cfbd154ae2e2212c367f 100644
--- a/tests/standalone/http_launch_test.dart
+++ b/tests/standalone/http_launch_test.dart
@@ -19,7 +19,8 @@ import 'dart:io';
import 'package:expect/expect.dart';
String pathToExecutable = Platform.executable;
-Uri pathOfData = Platform.script.resolve('http_launch_data/');
+String pathOfData = new File(Platform.script).parent.path +
+ '/http_launch_data';
int port;
_sendNotFound(HttpResponse response) {
@@ -28,9 +29,9 @@ _sendNotFound(HttpResponse response) {
}
handleRequest(HttpRequest request) {
- final String path = request.uri.path.substring(1);
- final Uri requestPath = pathOfData.resolve(path);
- final File file = new File(requestPath.toFilePath());
+ final String path = request.uri.path;
+ final String requestPath = '$pathOfData$path';
+ final File file = new File(requestPath);
file.exists().then((bool found) {
if (found) {
file.openRead()
@@ -46,8 +47,7 @@ serverRunning(HttpServer server) {
port = server.port;
server.listen(handleRequest);
Future<ProcessResult> no_http_run =
- Process.run(pathToExecutable,
- [pathOfData.resolve('http_launch_main.dart').toFilePath()]);
+ Process.run(pathToExecutable, ['${pathOfData}/http_launch_main.dart']);
Future<ProcessResult> http_run =
Process.run(pathToExecutable,
['http://127.0.0.1:$port/http_launch_main.dart']);
« no previous file with comments | « tests/standalone/debugger/debug_lib.dart ('k') | tests/standalone/io/code_collection_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698