| 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 library test.channel.web_socket; | 5 library test.channel.web_socket; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 9 import 'package:analysis_server/protocol/protocol.dart'; |
| 10 import 'package:analysis_server/src/channel/web_socket_channel.dart'; | 10 import 'package:analysis_server/src/channel/web_socket_channel.dart'; |
| 11 import 'package:analyzer/instrumentation/instrumentation.dart'; | 11 import 'package:analyzer/instrumentation/instrumentation.dart'; |
| 12 import 'package:test/test.dart'; | 12 import 'package:test/test.dart'; |
| 13 | 13 |
| 14 import '../mocks.dart'; | 14 import '../mocks.dart'; |
| 15 | 15 |
| 16 main() { | 16 main() { |
| 17 group('WebSocketChannel', () { | 17 group('WebSocketChannel', () { |
| 18 setUp(WebSocketChannelTest.setUp); | 18 setUp(WebSocketChannelTest.setUp); |
| 19 test('close', WebSocketChannelTest.close); | 19 test('close', WebSocketChannelTest.close); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 notificationsReceived = <Notification>[]; | 147 notificationsReceived = <Notification>[]; |
| 148 | 148 |
| 149 // Allow multiple listeners on server side for testing. | 149 // Allow multiple listeners on server side for testing. |
| 150 socket.twin.allowMultipleListeners(); | 150 socket.twin.allowMultipleListeners(); |
| 151 | 151 |
| 152 server.listen(requestsReceived.add); | 152 server.listen(requestsReceived.add); |
| 153 client.responseStream.listen(responsesReceived.add); | 153 client.responseStream.listen(responsesReceived.add); |
| 154 client.notificationStream.listen(notificationsReceived.add); | 154 client.notificationStream.listen(notificationsReceived.add); |
| 155 } | 155 } |
| 156 } | 156 } |
| OLD | NEW |