Chromium Code Reviews

Unified Diff: lib/src/backend/operating_system.dart

Issue 1731483002: Add iOS as an operating system. (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 | « README.md ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/backend/operating_system.dart
diff --git a/lib/src/backend/operating_system.dart b/lib/src/backend/operating_system.dart
index 610f3b581f96636c5f0c00080da1a8315d078397..45b14133f22f92d5390f70070a298ecba5c88aee 100644
--- a/lib/src/backend/operating_system.dart
+++ b/lib/src/backend/operating_system.dart
@@ -23,6 +23,12 @@ class OperatingSystem {
/// won't be true when testing remotely on an Android browser.
static const android = const OperatingSystem._("Android", "android");
+ /// iOS.
+ ///
+ /// Since this is the operating system the test runner is running on, this
+ /// won't be true when testing remotely on an iOS browser.
+ static const iOS = const OperatingSystem._("iOS", "ios");
+
/// No operating system.
///
/// This is used when running in the browser, or if an unrecognized operating
@@ -30,7 +36,7 @@ class OperatingSystem {
static const none = const OperatingSystem._("none", "none");
/// A list of all instances of [OperatingSystem] other than [none].
- static const all = const [windows, macOS, linux, android];
+ static const all = const [windows, macOS, linux, android, iOS];
/// Finds an operating system by its name.
///
@@ -48,6 +54,7 @@ class OperatingSystem {
case "macos": return macOS;
case "linux": return linux;
case "android": return android;
+ case "ios": return iOS;
default: return none;
}
}
« no previous file with comments | « README.md ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine