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

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

Issue 13860006: Fix static type errors in a number of tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
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 // VMOptions= 5 // VMOptions=
6 // VMOptions=--short_socket_read 6 // VMOptions=--short_socket_read
7 // VMOptions=--short_socket_write 7 // VMOptions=--short_socket_write
8 // VMOptions=--short_socket_read --short_socket_write 8 // VMOptions=--short_socket_read --short_socket_write
9 // 9 //
10 // Test socket close events. 10 // Test socket close events.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 proceed(); 83 proceed();
84 break; 84 break;
85 case 6: 85 case 6:
86 proceed(); 86 proceed();
87 break; 87 break;
88 default: 88 default:
89 Expect.fail("Unknown test mode"); 89 Expect.fail("Unknown test mode");
90 } 90 }
91 } 91 }
92 92
93 void errorHandler(Exception e) { 93 void errorHandler(Socket socket) {
94 _errorEvents++; 94 _errorEvents++;
95 socket.close(); 95 socket.close();
96 } 96 }
97 97
98 void connectHandler(socket) { 98 void connectHandler(socket) {
99 socket.listen( 99 socket.listen(
100 dataHandler, 100 dataHandler,
101 onDone: () => closeHandler(socket), 101 onDone: () => closeHandler(socket),
102 onError: (error) => errorHandler(socket)); 102 onError: (error) => errorHandler(socket));
103 103
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 var tests = 7; 378 var tests = 7;
379 var port = new ReceivePort(); 379 var port = new ReceivePort();
380 var completed = 0; 380 var completed = 0;
381 port.receive((message, ignore) { 381 port.receive((message, ignore) {
382 if (++completed == tests) port.close(); 382 if (++completed == tests) port.close();
383 }); 383 });
384 for (var i = 0; i < tests; i++) { 384 for (var i = 0; i < tests; i++) {
385 new SocketClose.start(i, port.toSendPort()); 385 new SocketClose.start(i, port.toSendPort());
386 } 386 }
387 } 387 }
OLDNEW
« no previous file with comments | « tests/standalone/io/secure_socket_argument_test.dart ('k') | tests/standalone/io/socket_exception_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698