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

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

Issue 1072783003: Remove server socket references (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 5 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 | « sdk/lib/io/socket.dart ('k') | tests/standalone/io/socket_bind_test.dart » ('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 | « sdk/lib/io/socket.dart ('k') | tests/standalone/io/socket_bind_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698