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

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

Issue 665823007: Several bugfixes in dart:io's handing of sockets (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added two spaces as requested 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 | « dart/runtime/bin/socket_patch.dart ('k') | dart/tests/standalone/standalone.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'dart:async';
6 import 'dart:io';
7
8 import 'package:async_helper/async_helper.dart';
9
10
11 testBothListen() {
12 asyncStart();
13 ServerSocket.bind('127.0.0.1', 0).then((mainServer) {
14 mainServer.reference.create().then((refServer) {
15 refServer.listen((_) {});
16 mainServer.listen((_) {});
17 Timer.run(() {
18 mainServer.close();
19 refServer.close();
20 asyncEnd();
21 });
22 });
23 });
24 }
25
26 testRefServerListen() {
27 asyncStart();
28 ServerSocket.bind('127.0.0.1', 0).then((mainServer) {
29 mainServer.reference.create().then((refServer) {
30 refServer.listen((_) {});
31 Timer.run(() {
32 mainServer.close();
33 refServer.close();
34 asyncEnd();
35 });
36 });
37 });
38 }
39
40 testMainServerListen() {
41 asyncStart();
42 ServerSocket.bind('127.0.0.1', 0).then((mainServer) {
43 mainServer.reference.create().then((refServer) {
44 mainServer.listen((_) {});
45 Timer.run(() {
46 mainServer.close();
47 refServer.close();
48 asyncEnd();
49 });
50 });
51 });
52 }
53
54 testNoneListen() {
55 asyncStart();
56 ServerSocket.bind('127.0.0.1', 0).then((mainServer) {
57 mainServer.reference.create().then((refServer) {
58 Timer.run(() {
59 mainServer.close();
60 refServer.close();
61 asyncEnd();
62 });
63 });
64 });
65 }
66
67 main() {
68 testNoneListen();
69 testMainServerListen();
70 testRefServerListen();
71 testBothListen();
72 }
73
OLDNEW
« no previous file with comments | « dart/runtime/bin/socket_patch.dart ('k') | dart/tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698