Skip to content

Commit ef599b3

Browse files
committed
Parse Mac OS X as a Platform
Closes #4700
1 parent e2e1d77 commit ef599b3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

java/client/src/org/openqa/selenium/Platform.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public Platform family() {
8484
}
8585
},
8686

87-
MAC("mac", "darwin", "macOS", "os x") {
87+
MAC("mac", "darwin", "macOS", "mac os x", "os x") {
8888
@Override
8989
public Platform family() {
9090
return null;

java/client/test/org/openqa/selenium/PlatformTest.java

+5
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ public void testWindowsIsWindows() {
151151
assertEquals(Platform.fromString("windows"), Platform.WINDOWS);
152152
}
153153

154+
@Test
155+
public void canParseMacOsXCorrectly() {
156+
assertEquals(Platform.MAC, Platform.fromString("Mac OS X"));
157+
}
158+
154159
private void assertAllAre(Platform platform, String... osNames) {
155160
for (String osName : osNames) {
156161
Platform seen = Platform.extractFromSysProperty(osName);

0 commit comments

Comments
 (0)