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

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

Issue 2441073002: Fix http_server_response_test.dart not to use snapshots as its data. (Closed)
Patch Set: Created 4 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 | « no previous file | tests/standalone/standalone.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698