Skip to content

Commit 4a30da6

Browse files
authored
[java] change chromium service names from whitelisted to allowed (#11409)
1 parent 5450d7c commit 4a30da6

2 files changed

Lines changed: 18 additions & 7 deletions

File tree

java/src/org/openqa/selenium/chrome/ChromeDriverService.java

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ public class ChromeDriverService extends DriverService {
8282
* System property that defines comma-separated list of remote IPv4 addresses which are
8383
* allowed to connect to ChromeDriver.
8484
*/
85+
public static final String CHROME_DRIVER_ALLOWED_IPS_PROPERTY = "webdriver.chrome.withAllowedIps";
86+
87+
/**
88+
* System property that defines comma-separated list of remote IPv4 addresses which are
89+
* allowed to connect to ChromeDriver.
90+
* @deprecated use {@link #CHROME_DRIVER_ALLOWED_IPS_PROPERTY}
91+
*/
92+
@Deprecated
8593
public static final String CHROME_DRIVER_WHITELISTED_IPS_PROPERTY = "webdriver.chrome.whitelistedIps";
8694

8795
/**
@@ -164,7 +172,8 @@ public static class Builder extends DriverService.Builder<
164172
private boolean appendLog = Boolean.getBoolean(CHROME_DRIVER_APPEND_LOG_PROPERTY);
165173
private boolean verbose = Boolean.getBoolean(CHROME_DRIVER_VERBOSE_LOG_PROPERTY);
166174
private boolean silent = Boolean.getBoolean(CHROME_DRIVER_SILENT_OUTPUT_PROPERTY);
167-
private String whitelistedIps = System.getProperty(CHROME_DRIVER_WHITELISTED_IPS_PROPERTY);
175+
private String allowedListIps = System.getProperty(CHROME_DRIVER_ALLOWED_IPS_PROPERTY,
176+
System.getProperty(CHROME_DRIVER_WHITELISTED_IPS_PROPERTY));
168177
private ChromeDriverLogLevel logLevel = ChromeDriverLogLevel.fromString(System.getProperty(CHROME_DRIVER_LOG_LEVEL_PROPERTY));
169178

170179
@Override
@@ -250,11 +259,13 @@ public Builder withSilent(boolean silent) {
250259
* Configures the comma-separated list of remote IPv4 addresses which are allowed to connect
251260
* to the driver server.
252261
*
253-
* @param whitelistedIps Comma-separated list of remote IPv4 addresses.
262+
* @param allowedListIps Comma-separated list of remote IPv4 addresses.
254263
* @return A self reference.
264+
* @deprecated use {@link #withAllowedListIps(String)}
255265
*/
256-
public Builder withWhitelistedIps(String whitelistedIps) {
257-
this.whitelistedIps = whitelistedIps;
266+
@Deprecated
267+
public Builder withWhitelistedIps(String allowedListIps) {
268+
this.allowedListIps = allowedListIps;
258269
return this;
259270
}
260271

@@ -310,8 +321,8 @@ protected List<String> createArgs() {
310321
if (logLevel != null) {
311322
args.add(String.format("--log-level=%s", logLevel.toString().toUpperCase()));
312323
}
313-
if (whitelistedIps != null) {
314-
args.add(String.format("--whitelisted-ips=%s", whitelistedIps));
324+
if (allowedListIps != null) {
325+
args.add(String.format("--allowed-ips=%s", allowedListIps));
315326
}
316327
if (disableBuildCheck) {
317328
args.add("--disable-build-check");

java/src/org/openqa/selenium/edge/EdgeDriverService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ protected List<String> createArgs() {
281281
args.add(String.format("--log-level=%s", logLevel));
282282
}
283283
if (allowedListIps != null) {
284-
args.add(String.format("--whitelisted-ips=%s", allowedListIps));
284+
args.add(String.format("--allowed-ips=%s", allowedListIps));
285285
}
286286
if (disableBuildCheck) {
287287
args.add("--disable-build-check");

0 commit comments

Comments
 (0)