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

Side by Side Diff: dart/tests/standalone/io/regress_21160_test.dart

Issue 609893003: Use less data for regression_21160_test to eliminate simulator timeouts (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import "package:path/path.dart"; 6 import "package:path/path.dart";
7 import "package:async_helper/async_helper.dart"; 7 import "package:async_helper/async_helper.dart";
8 8
9 import "dart:async"; 9 import "dart:async";
10 import "dart:io"; 10 import "dart:io";
11 import "dart:typed_data"; 11 import "dart:typed_data";
12 12
13 // 1 MB of i%256 data. 13 // 10 KiB of i%256 data.
14 Uint8List DATA = new Uint8List.fromList( 14 Uint8List DATA = new Uint8List.fromList(
15 new List.generate(1024 * 1024, (i) => i % 256)); 15 new List.generate(10 * 1024, (i) => i % 256));
16 16
17 Future<SecureServerSocket> startServer() { 17 Future<SecureServerSocket> startServer() {
18 return SecureServerSocket.bind("localhost", 18 return SecureServerSocket.bind("localhost",
19 0, 19 0,
20 'localhost_cert').then((server) { 20 'localhost_cert').then((server) {
21 server.listen((SecureSocket request) { 21 server.listen((SecureSocket request) {
22 request.drain().then((_) { 22 request.drain().then((_) {
23 request 23 request
24 ..add(DATA) 24 ..add(DATA)
25 ..close(); 25 ..close();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 Expect.equals(body.length, DATA.length); 70 Expect.equals(body.length, DATA.length);
71 for (int i = 0; i < body.length; i++) { 71 for (int i = 0; i < body.length; i++) {
72 Expect.equals(body[i], DATA[i]); 72 Expect.equals(body[i], DATA[i]);
73 } 73 }
74 server.close(); 74 server.close();
75 asyncEnd(); 75 asyncEnd();
76 }); 76 });
77 }); 77 });
78 }); 78 });
79 } 79 }
OLDNEW
« 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