OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 @TestOn('vm') |
| 6 |
5 library http_parser.web_socket_test; | 7 library http_parser.web_socket_test; |
6 | 8 |
7 import 'dart:io'; | 9 import 'dart:io'; |
8 | 10 |
9 import 'package:http_parser/http_parser.dart'; | 11 import 'package:http_parser/http_parser.dart'; |
10 import 'package:test/test.dart'; | 12 import 'package:test/test.dart'; |
11 | 13 |
12 void main() { | 14 void main() { |
13 test("a client can communicate with a WebSocket server", () { | 15 test("a client can communicate with a WebSocket server", () { |
14 return HttpServer.bind("localhost", 0).then((server) { | 16 return HttpServer.bind("localhost", 0).then((server) { |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 server.close(); | 90 server.close(); |
89 } else { | 91 } else { |
90 fail("Only expected two messages."); | 92 fail("Only expected two messages."); |
91 } | 93 } |
92 n++; | 94 n++; |
93 }).asFuture(); | 95 }).asFuture(); |
94 }); | 96 }); |
95 }); | 97 }); |
96 }); | 98 }); |
97 } | 99 } |
OLD | NEW |