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

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

Issue 1062683004: Preliminary safari support. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Polish Created 5 years, 8 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
« no previous file with comments | « README.md ('k') | lib/src/executable.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 library test.backend.test_platform; 5 library test.backend.test_platform;
6 6
7 // TODO(nweiz): support pluggable platforms. 7 // TODO(nweiz): support pluggable platforms.
8 /// An enum of all platforms on which tests can run. 8 /// An enum of all platforms on which tests can run.
9 class TestPlatform { 9 class TestPlatform {
10 // When adding new platforms, be sure to update the baseline and derived 10 // When adding new platforms, be sure to update the baseline and derived
(...skipping 18 matching lines...) Expand all
29 29
30 /// PhantomJS. 30 /// PhantomJS.
31 static const TestPlatform phantomJS = const TestPlatform._( 31 static const TestPlatform phantomJS = const TestPlatform._(
32 "PhantomJS", "phantomjs", 32 "PhantomJS", "phantomjs",
33 isBrowser: true, isJS: true, isBlink: true); 33 isBrowser: true, isJS: true, isBlink: true);
34 34
35 /// Mozilla Firefox. 35 /// Mozilla Firefox.
36 static const TestPlatform firefox = const TestPlatform._("Firefox", "firefox", 36 static const TestPlatform firefox = const TestPlatform._("Firefox", "firefox",
37 isBrowser: true, isJS: true); 37 isBrowser: true, isJS: true);
38 38
39 /// Apple Safari.
40 static const TestPlatform safari = const TestPlatform._("Safari", "safari",
41 isBrowser: true, isJS: true);
42
39 /// A list of all instances of [TestPlatform]. 43 /// A list of all instances of [TestPlatform].
40 static const List<TestPlatform> all = 44 static const List<TestPlatform> all =
41 const [vm, dartium, contentShell, chrome, phantomJS, firefox]; 45 const [vm, dartium, contentShell, chrome, phantomJS, firefox, safari];
42 46
43 /// Finds a platform by its identifier string. 47 /// Finds a platform by its identifier string.
44 /// 48 ///
45 /// If no platform is found, returns `null`. 49 /// If no platform is found, returns `null`.
46 static TestPlatform find(String identifier) => 50 static TestPlatform find(String identifier) =>
47 all.firstWhere((platform) => platform.identifier == identifier, 51 all.firstWhere((platform) => platform.identifier == identifier,
48 orElse: () => null); 52 orElse: () => null);
49 53
50 /// The human-friendly name of the platform. 54 /// The human-friendly name of the platform.
51 final String name; 55 final String name;
(...skipping 11 matching lines...) Expand all
63 final bool isJS; 67 final bool isJS;
64 68
65 /// Whether this platform uses the Blink rendering engine. 69 /// Whether this platform uses the Blink rendering engine.
66 final bool isBlink; 70 final bool isBlink;
67 71
68 const TestPlatform._(this.name, this.identifier, {this.isDartVm: false, 72 const TestPlatform._(this.name, this.identifier, {this.isDartVm: false,
69 this.isBrowser: false, this.isJS: false, this.isBlink: false}); 73 this.isBrowser: false, this.isJS: false, this.isBlink: false});
70 74
71 String toString() => name; 75 String toString() => name;
72 } 76 }
OLDNEW
« no previous file with comments | « README.md ('k') | lib/src/executable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698