Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(801)

Side by Side Diff: lib/src/runner/vm/platform.dart

Issue 1704773002: Load web tests using the plugin infrastructure. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 4
5 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:isolate'; 6 import 'dart:isolate';
7 7
8 import 'package:path/path.dart' as p; 8 import 'package:path/path.dart' as p;
9 import 'package:stream_channel/stream_channel.dart'; 9 import 'package:stream_channel/stream_channel.dart';
10 10
11 import '../../backend/test_platform.dart'; 11 import '../../backend/test_platform.dart';
12 import '../../util/dart.dart' as dart; 12 import '../../util/dart.dart' as dart;
13 import '../configuration.dart'; 13 import '../configuration.dart';
14 import '../load_exception.dart'; 14 import '../load_exception.dart';
15 import '../plugin/platform.dart'; 15 import '../plugin/platform.dart';
16 16
17 /// A platform that loads tests in isolates spawned within this Dart process. 17 /// A platform that loads tests in isolates spawned within this Dart process.
18 class VMPlatform extends PlatformPlugin { 18 class VMPlatform extends PlatformPlugin {
19 final platforms = [TestPlatform.vm];
20
21 /// The test runner configuration. 19 /// The test runner configuration.
22 final Configuration _config; 20 final Configuration _config;
23 21
24 VMPlatform(this._config); 22 VMPlatform(this._config);
25 23
26 StreamChannel loadChannel(String path, TestPlatform platform) { 24 StreamChannel loadChannel(String path, TestPlatform platform) {
27 assert(platform == TestPlatform.vm); 25 assert(platform == TestPlatform.vm);
28 26
29 var isolate; 27 var isolate;
30 var channel = StreamChannelCompleter.fromFuture(() async { 28 var channel = StreamChannelCompleter.fromFuture(() async {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } else if (error.message.contains("404 Not Found")) { 86 } else if (error.message.contains("404 Not Found")) {
89 throw new LoadException(path, 87 throw new LoadException(path,
90 "Error getting $url: 404 Not Found\n" 88 "Error getting $url: 404 Not Found\n"
91 'Make sure "pub serve" is serving the test/ directory.'); 89 'Make sure "pub serve" is serving the test/ directory.');
92 } 90 }
93 91
94 throw new LoadException(path, error); 92 throw new LoadException(path, error);
95 } 93 }
96 } 94 }
97 } 95 }
OLDNEW
« lib/src/runner/browser/static/host.dart ('K') | « lib/src/runner/runner_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698