| 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 'test_helper.dart'; | 6 import 'test_helper.dart'; |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:developer'; | 8 import 'dart:developer'; |
| 9 import 'dart:isolate' as I; | 9 import 'dart:isolate' as I; |
| 10 import 'dart:io'; | 10 import 'dart:io'; |
| 11 import 'service_test_common.dart'; | 11 import 'service_test_common.dart'; |
| 12 import 'package:observatory/service.dart'; | 12 import 'package:observatory/service.dart'; |
| 13 import 'package:path/path.dart' as path; | 13 import 'package:path/path.dart' as path; |
| 14 import 'package:unittest/unittest.dart'; | 14 import 'package:unittest/unittest.dart'; |
| 15 | 15 |
| 16 // Chop off the file name. | 16 // Chop off the file name. |
| 17 String baseDirectory = | 17 String baseDirectory = |
| 18 path.dirname(Platform.script.path) + Platform.pathSeparator; | 18 path.dirname(Platform.script.path) + '/'; |
| 19 | 19 |
| 20 Uri baseUri = Platform.script.replace(path: baseDirectory); | 20 Uri baseUri = Platform.script.replace(path: baseDirectory); |
| 21 Uri spawnUri = baseUri.resolveUri(Uri.parse('complex_reload/v1/main.dart')); | 21 Uri spawnUri = baseUri.resolveUri(Uri.parse('complex_reload/v1/main.dart')); |
| 22 Uri v2Uri = baseUri.resolveUri(Uri.parse('complex_reload/v2/main.dart')); | 22 Uri v2Uri = baseUri.resolveUri(Uri.parse('complex_reload/v2/main.dart')); |
| 23 Uri v3Uri = baseUri.resolveUri(Uri.parse('complex_reload/v3/main.dart')); | 23 Uri v3Uri = baseUri.resolveUri(Uri.parse('complex_reload/v3/main.dart')); |
| 24 | 24 |
| 25 testMain() async { | 25 testMain() async { |
| 26 print(baseUri); | 26 print(baseUri); |
| 27 debugger(); // Stop here. | 27 debugger(); // Stop here. |
| 28 // Spawn the child isolate. | 28 // Spawn the child isolate. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 ); | 81 ); |
| 82 expect(response['success'], isTrue); | 82 expect(response['success'], isTrue); |
| 83 | 83 |
| 84 // Invoke test in v3. | 84 // Invoke test in v3. |
| 85 String v3 = await invokeTest(slaveIsolate); | 85 String v3 = await invokeTest(slaveIsolate); |
| 86 expect(v3, 'cabbage'); | 86 expect(v3, 'cabbage'); |
| 87 } | 87 } |
| 88 ]; | 88 ]; |
| 89 | 89 |
| 90 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); | 90 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); |
| OLD | NEW |