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

Unified Diff: mojo/public/dart/third_party/test/lib/src/backend/test_platform.dart

Issue 1346773002: Stop running pub get at gclient sync time and fix build bugs (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/dart/third_party/test/lib/src/backend/test_platform.dart
diff --git a/mojo/public/dart/third_party/test/lib/src/backend/test_platform.dart b/mojo/public/dart/third_party/test/lib/src/backend/test_platform.dart
new file mode 100644
index 0000000000000000000000000000000000000000..731bbd5ee68453f498eb805aee42aeea1c2a7e43
--- /dev/null
+++ b/mojo/public/dart/third_party/test/lib/src/backend/test_platform.dart
@@ -0,0 +1,93 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library test.backend.test_platform;
+
+// TODO(nweiz): support pluggable platforms.
+/// An enum of all platforms on which tests can run.
+class TestPlatform {
+ // When adding new platforms, be sure to update the baseline and derived
+ // variable tests in test/backend/platform_selector/evaluate_test.
+
+ /// The command-line Dart VM.
+ static const TestPlatform vm =
+ const TestPlatform._("VM", "vm", isDartVM: true);
+
+ /// Dartium.
+ static const TestPlatform dartium = const TestPlatform._("Dartium", "dartium",
+ isBrowser: true, isBlink: true, isDartVM: true);
+
+ /// Dartium content shell.
+ static const TestPlatform contentShell = const TestPlatform._(
+ "Dartium Content Shell", "content-shell",
+ isBrowser: true, isBlink: true, isDartVM: true, isHeadless: true);
+
+ /// Google Chrome.
+ static const TestPlatform chrome = const TestPlatform._("Chrome", "chrome",
+ isBrowser: true, isJS: true, isBlink: true);
+
+ /// PhantomJS.
+ static const TestPlatform phantomJS = const TestPlatform._(
+ "PhantomJS", "phantomjs",
+ isBrowser: true, isJS: true, isBlink: true, isHeadless: true);
+
+ /// Mozilla Firefox.
+ static const TestPlatform firefox = const TestPlatform._("Firefox", "firefox",
+ isBrowser: true, isJS: true);
+
+ /// Apple Safari.
+ static const TestPlatform safari = const TestPlatform._("Safari", "safari",
+ isBrowser: true, isJS: true);
+
+ /// Microsoft Internet Explorer.
+ static const TestPlatform internetExplorer = const TestPlatform._(
+ "Internet Explorer", "ie",
+ isBrowser: true, isJS: true);
+
+ /// A list of all instances of [TestPlatform].
+ static const List<TestPlatform> all = const [
+ vm,
+ dartium,
+ contentShell,
+ chrome,
+ phantomJS,
+ firefox,
+ safari,
+ internetExplorer
+ ];
+
+ /// Finds a platform by its identifier string.
+ ///
+ /// If no platform is found, returns `null`.
+ static TestPlatform find(String identifier) =>
+ all.firstWhere((platform) => platform.identifier == identifier,
+ orElse: () => null);
+
+ /// The human-friendly name of the platform.
+ final String name;
+
+ /// The identifier used to look up the platform.
+ final String identifier;
+
+ /// Whether this platform runs the Dart VM in any capacity.
+ final bool isDartVM;
+
+ /// Whether this platform is a browser.
+ final bool isBrowser;
+
+ /// Whether this platform runs Dart compiled to JavaScript.
+ final bool isJS;
+
+ /// Whether this platform uses the Blink rendering engine.
+ final bool isBlink;
+
+ /// Whether this platform has no visible window.
+ final bool isHeadless;
+
+ const TestPlatform._(this.name, this.identifier, {this.isDartVM: false,
+ this.isBrowser: false, this.isJS: false, this.isBlink: false,
+ this.isHeadless: false});
+
+ String toString() => name;
+}
« no previous file with comments | « mojo/public/dart/third_party/test/lib/src/backend/test.dart ('k') | mojo/public/dart/third_party/test/lib/src/executable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698