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 'package:stream_channel/stream_channel.dart'; |
| 6 |
5 import '../../backend/group.dart'; | 7 import '../../backend/group.dart'; |
6 import '../../backend/live_test.dart'; | 8 import '../../backend/live_test.dart'; |
7 import '../../backend/live_test_controller.dart'; | 9 import '../../backend/live_test_controller.dart'; |
8 import '../../backend/metadata.dart'; | 10 import '../../backend/metadata.dart'; |
9 import '../../backend/operating_system.dart'; | 11 import '../../backend/operating_system.dart'; |
10 import '../../backend/state.dart'; | 12 import '../../backend/state.dart'; |
11 import '../../backend/suite.dart'; | 13 import '../../backend/suite.dart'; |
12 import '../../backend/test.dart'; | 14 import '../../backend/test.dart'; |
13 import '../../backend/test_platform.dart'; | 15 import '../../backend/test_platform.dart'; |
14 import '../../utils.dart'; | 16 import '../../utils.dart'; |
15 import '../../util/multi_channel.dart'; | |
16 import '../../util/remote_exception.dart'; | 17 import '../../util/remote_exception.dart'; |
17 import '../../util/stack_trace_mapper.dart'; | 18 import '../../util/stack_trace_mapper.dart'; |
18 | 19 |
19 /// A test in a running iframe. | 20 /// A test in a running iframe. |
20 class IframeTest extends Test { | 21 class IframeTest extends Test { |
21 final String name; | 22 final String name; |
22 final Metadata metadata; | 23 final Metadata metadata; |
23 | 24 |
24 /// The mapper used to map stack traces for errors coming from this test, or | 25 /// The mapper used to map stack traces for errors coming from this test, or |
25 /// `null`. | 26 /// `null`. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 return controller.liveTest; | 88 return controller.liveTest; |
88 } | 89 } |
89 | 90 |
90 Test forPlatform(TestPlatform platform, {OperatingSystem os}) { | 91 Test forPlatform(TestPlatform platform, {OperatingSystem os}) { |
91 if (!metadata.testOn.evaluate(platform, os: os)) return null; | 92 if (!metadata.testOn.evaluate(platform, os: os)) return null; |
92 return new IframeTest( | 93 return new IframeTest( |
93 name, metadata.forPlatform(platform, os: os), _channel, | 94 name, metadata.forPlatform(platform, os: os), _channel, |
94 mapper: _mapper); | 95 mapper: _mapper); |
95 } | 96 } |
96 } | 97 } |
OLD | NEW |