| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:convert'; | 6 import 'dart:convert'; |
| 7 import 'dart:io' as io; | 7 import 'dart:io' as io; |
| 8 import 'package:observatory/service_io.dart'; | 8 import 'package:observatory/service_io.dart'; |
| 9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
| 10 import 'test_helper.dart'; | 10 import 'test_helper.dart'; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // Initial. | 55 // Initial. |
| 56 (Isolate isolate) async { | 56 (Isolate isolate) async { |
| 57 var result = await isolate.invokeRpcNoUpgrade('__getOpenSockets', {}); | 57 var result = await isolate.invokeRpcNoUpgrade('__getOpenSockets', {}); |
| 58 expect(result['type'], equals('_opensockets')); | 58 expect(result['type'], equals('_opensockets')); |
| 59 // We expect only one socket to be open, the server socket create at the | 59 // We expect only one socket to be open, the server socket create at the |
| 60 // end of test. | 60 // end of test. |
| 61 expect(result['data'].length, equals(1)); | 61 expect(result['data'].length, equals(1)); |
| 62 var server = await isolate.invokeRpcNoUpgrade( | 62 var server = await isolate.invokeRpcNoUpgrade( |
| 63 '__getSocketByID', { 'id' : result['data'][0]['id'] }); | 63 '__getSocketByID', { 'id' : result['data'][0]['id'] }); |
| 64 expect(server['listening'], isTrue); | 64 expect(server['listening'], isTrue); |
| 65 expect(server['last_read'], equals(0)); | 65 expect(server['lastRead'], equals(0)); |
| 66 expect(server['total_read'], equals(0)); | 66 expect(server['totalRead'], equals(0)); |
| 67 expect(server['last_write'], equals(0)); | 67 expect(server['lastWrite'], equals(0)); |
| 68 expect(server['total_written'], equals(0)); | 68 expect(server['totalWritten'], equals(0)); |
| 69 expect(server['write_count'], equals(0)); | 69 expect(server['writeCount'], equals(0)); |
| 70 expect(server['read_count'], equals(0)); | 70 expect(server['readCount'], equals(0)); |
| 71 }, | 71 }, |
| 72 ]; | 72 ]; |
| 73 | 73 |
| 74 main(args) async => runIsolateTests(args, tests, testeeBefore:setup); | 74 main(args) async => runIsolateTests(args, tests, testeeBefore:setup); |
| OLD | NEW |