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

Side by Side Diff: lib/src/runner/test_platform.dart

Issue 983573002: Add support for running browser tests to the test runner. (Closed) Base URL: git@github.com:dart-lang/unittest@master
Patch Set: Created 5 years, 9 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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // TODO(nweiz): support pluggable platforms.
6 /// An enum of all platforms on which tests can run.
7 class TestPlatform {
8 /// The command-line Dart VM.
9 static const vm = const TestPlatform._("VM", "vm");
10
11 /// Google Chrome.
12 static const chrome = const TestPlatform._("Chrome", "chrome");
13
14 /// A list of all instances of [TestPlatform].
15 static const all = const [vm, chrome];
16
17 /// Finds a platform by its identifier string.
18 ///
19 /// If no platform is found, returns `null`.
20 static TestPlatform find(String identifier) =>
21 all.firstWhere((platform) => platform.identifier == identifier,
22 orElse: () => null);
23
24 /// The human-friendly name of the platform.
25 final String name;
26
27 /// The identifier used to look up the platform.
28 final String identifier;
29
30 const TestPlatform._(this.name, this.identifier);
31
32 String toString() => name;
33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698