| Index: tests/standalone/io/http_server_response_test.dart
|
| diff --git a/tests/standalone/io/http_server_response_test.dart b/tests/standalone/io/http_server_response_test.dart
|
| index 967a5080652ab7dbfdc46dd8dc510f8c31a6d483..c3c0afb51d6326fb79d28afd0f7da37f4a23433f 100644
|
| --- a/tests/standalone/io/http_server_response_test.dart
|
| +++ b/tests/standalone/io/http_server_response_test.dart
|
| @@ -6,12 +6,18 @@
|
| // VMOptions=--short_socket_read
|
| // VMOptions=--short_socket_write
|
| // VMOptions=--short_socket_read --short_socket_write
|
| +// OtherResources=http_server_response_test.dart
|
|
|
| import "package:expect/expect.dart";
|
| import "dart:async";
|
| import "dart:io";
|
| import "dart:typed_data";
|
|
|
| +// Platform.script may refer to a AOT or JIT snapshot, which are significantly
|
| +// larger.
|
| +File scriptSource = new File(
|
| + Platform.script.resolve("http_server_response_test.dart").toFilePath());
|
| +
|
| void testServerRequest(void handler(server, request),
|
| {int bytes,
|
| bool closeClient}) {
|
| @@ -81,7 +87,7 @@ void testResponseDone() {
|
|
|
|
|
| void testResponseAddStream() {
|
| - File file = new File(Platform.script.toFilePath());
|
| + File file = scriptSource;
|
| int bytes = file.lengthSync();
|
|
|
| testServerRequest((server, request) {
|
| @@ -130,7 +136,7 @@ void testResponseAddStream() {
|
|
|
|
|
| void testResponseAddStreamClosed() {
|
| - File file = new File(Platform.script.toFilePath());
|
| + File file = scriptSource;
|
| testServerRequest((server, request) {
|
| request.response.addStream(file.openRead())
|
| .then((response) {
|
| @@ -160,7 +166,7 @@ void testResponseAddStreamClosed() {
|
|
|
|
|
| void testResponseAddClosed() {
|
| - File file = new File(Platform.script.toFilePath());
|
| + File file = scriptSource;
|
| testServerRequest((server, request) {
|
| request.response.add(file.readAsBytesSync());
|
| request.response.close();
|
|
|