Chromium Code Reviews

Unified Diff: lib/src/runner/runner_test.dart

Issue 1685363002: Add a platform plugin infrastructure. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « lib/src/runner/remote_listener.dart ('k') | lib/src/runner/vm/catch_isolate_errors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/runner_test.dart
diff --git a/lib/src/runner/browser/iframe_test.dart b/lib/src/runner/runner_test.dart
similarity index 72%
copy from lib/src/runner/browser/iframe_test.dart
copy to lib/src/runner/runner_test.dart
index 07e4bfd20c1eddd0240ca30e6bae04d30058202f..ca2c54391f7da7373a0e2c078ad7adfb6c99bb4f 100644
--- a/lib/src/runner/browser/iframe_test.dart
+++ b/lib/src/runner/runner_test.dart
@@ -4,33 +4,27 @@
import 'package:stream_channel/stream_channel.dart';
-import '../../backend/group.dart';
-import '../../backend/live_test.dart';
-import '../../backend/live_test_controller.dart';
-import '../../backend/metadata.dart';
-import '../../backend/operating_system.dart';
-import '../../backend/state.dart';
-import '../../backend/suite.dart';
-import '../../backend/test.dart';
-import '../../backend/test_platform.dart';
-import '../../utils.dart';
-import '../../util/remote_exception.dart';
-import '../../util/stack_trace_mapper.dart';
+import '../backend/group.dart';
+import '../backend/live_test.dart';
+import '../backend/live_test_controller.dart';
+import '../backend/metadata.dart';
+import '../backend/operating_system.dart';
+import '../backend/state.dart';
+import '../backend/suite.dart';
+import '../backend/test.dart';
+import '../backend/test_platform.dart';
+import '../utils.dart';
+import '../util/remote_exception.dart';
-/// A test in a running iframe.
-class IframeTest extends Test {
+/// A test running remotely, controlled by a stream channel.
+class RunnerTest extends Test {
final String name;
final Metadata metadata;
- /// The mapper used to map stack traces for errors coming from this test, or
- /// `null`.
- final StackTraceMapper _mapper;
-
/// The channel used to communicate with the test's [IframeListener].
final MultiChannel _channel;
- IframeTest(this.name, this.metadata, this._channel, {StackTraceMapper mapper})
- : _mapper = mapper;
+ RunnerTest(this.name, this.metadata, this._channel);
LiveTest load(Suite suite, {Iterable<Group> groups}) {
var controller;
@@ -49,8 +43,6 @@ class IframeTest extends Test {
var asyncError = RemoteException.deserialize(message['error']);
var stackTrace = asyncError.stackTrace;
- if (_mapper != null) stackTrace = _mapper.mapStackTrace(stackTrace);
-
controller.addError(asyncError.error, stackTrace);
} else if (message['type'] == 'state-change') {
controller.setState(
@@ -90,8 +82,7 @@ class IframeTest extends Test {
Test forPlatform(TestPlatform platform, {OperatingSystem os}) {
if (!metadata.testOn.evaluate(platform, os: os)) return null;
- return new IframeTest(
- name, metadata.forPlatform(platform, os: os), _channel,
- mapper: _mapper);
+ return new RunnerTest(
+ name, metadata.forPlatform(platform, os: os), _channel);
}
}
« no previous file with comments | « lib/src/runner/remote_listener.dart ('k') | lib/src/runner/vm/catch_isolate_errors.dart » ('j') | no next file with comments »

Powered by Google App Engine