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 // 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:developer'; | 7 import 'dart:developer'; |
8 import 'package:observatory/service_io.dart'; | 8 import 'package:observatory/service_io.dart' as S; |
9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
10 import 'test_helper.dart'; | 10 import 'test_helper.dart'; |
11 | 11 |
12 int majorVersion; | 12 int majorVersion; |
13 int minorVersion; | 13 int minorVersion; |
14 Uri serverUri; | 14 Uri serverUri; |
15 | 15 |
16 Future<Null> testeeBefore() async { | 16 Future<Null> testeeBefore() async { |
17 print('testee before'); | 17 print('testee before'); |
18 // First grab the URL where the observatory is listening on and the | 18 // First grab the URL where the observatory is listening on and the |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 majorVersion = info.majorVersion; | 62 majorVersion = info.majorVersion; |
63 minorVersion = info.minorVersion; | 63 minorVersion = info.minorVersion; |
64 serverUri = info.serverUri; | 64 serverUri = info.serverUri; |
65 expect(info.majorVersion, equals(majorVersion)); | 65 expect(info.majorVersion, equals(majorVersion)); |
66 expect(info.minorVersion, equals(minorVersion)); | 66 expect(info.minorVersion, equals(minorVersion)); |
67 expect(info.serverUri, equals(serverUri)); | 67 expect(info.serverUri, equals(serverUri)); |
68 } | 68 } |
69 } | 69 } |
70 | 70 |
71 var tests = [ | 71 var tests = [ |
72 (Isolate isolate) async { | 72 (S.Isolate isolate) async { |
73 await isolate.reload(); | 73 await isolate.reload(); |
74 // Just getting here means that the testee enabled the service protocol | 74 // Just getting here means that the testee enabled the service protocol |
75 // web server. | 75 // web server. |
76 expect(true, true); | 76 expect(true, true); |
77 } | 77 } |
78 ]; | 78 ]; |
79 | 79 |
80 main(args) => runIsolateTests(args, tests, | 80 main(args) => runIsolateTests(args, tests, |
81 testeeBefore: testeeBefore, | 81 testeeBefore: testeeBefore, |
82 // the testee is responsible for starting the | 82 // the testee is responsible for starting the |
83 // web server. | 83 // web server. |
84 testeeControlsServer: true); | 84 testeeControlsServer: true); |
OLD | NEW |