| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 // VMOptions=--error_on_bad_type --error_on_bad_override | 4 // VMOptions=--error_on_bad_type --error_on_bad_override |
| 5 | 5 |
| 6 import 'dart:async'; | 6 import 'dart:async'; |
| 7 import 'dart:convert'; | 7 import 'dart:convert'; |
| 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 'service_test_common.dart'; | 10 import 'service_test_common.dart'; |
| 11 import 'test_helper.dart'; | 11 import 'test_helper.dart'; |
| 12 | 12 |
| 13 import 'dart:io'; // remove | |
| 14 | |
| 15 var tests = [ | 13 var tests = [ |
| 16 (VM vm) async { | 14 (VM vm) async { |
| 17 // Create a new fs. | 15 // Create a new fs. |
| 18 var fsName = 'scratch'; | 16 var fsName = 'scratch'; |
| 19 var result = await vm.invokeRpcNoUpgrade('_createDevFS', { | 17 var result = await vm.invokeRpcNoUpgrade('_createDevFS', { |
| 20 'fsName': fsName, | 18 'fsName': fsName, |
| 21 }); | 19 }); |
| 22 expect(result['type'], equals('FileSystem')); | 20 expect(result['type'], equals('FileSystem')); |
| 23 expect(result['name'], equals('scratch')); | 21 expect(result['name'], equals('scratch')); |
| 24 expect(result['uri'], new isInstanceOf<String>()); | 22 expect(result['uri'], new isInstanceOf<String>()); |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 210 |
| 213 // Delete the fs. | 211 // Delete the fs. |
| 214 result = await vm.invokeRpcNoUpgrade('_deleteDevFS', { | 212 result = await vm.invokeRpcNoUpgrade('_deleteDevFS', { |
| 215 'fsName': fsName, | 213 'fsName': fsName, |
| 216 }); | 214 }); |
| 217 expect(result['type'], equals('Success')); | 215 expect(result['type'], equals('Success')); |
| 218 }, | 216 }, |
| 219 ]; | 217 ]; |
| 220 | 218 |
| 221 main(args) async => runVMTests(args, tests); | 219 main(args) async => runVMTests(args, tests); |
| OLD | NEW |