[ChromeDriver] Update Selenium tests
Change-Id: Idb9d946517475a642331e765c7e2786f8309d548
diff --git a/README.chromium b/README.chromium
index 795bc24..20dcadc 100644
--- a/README.chromium
+++ b/README.chromium
@@ -1,8 +1,8 @@
Name: WebDriver
Short Name: WebDriver
URL: https://github.com/SeleniumHQ/selenium
-Version: 4.0.0-alpha2
-Revision: 6a719fff767136a3c83a395d5471c094d0c6cb12
+Version: 4.0.0-alpha3
+Revision: 5af55c70d597b9edfa14f7b8ae8e6957812e9763
License: Apache 2.0,
License File: https://github.com/SeleniumHQ/selenium/blob/master/LICENSE
Security Critical: no
diff --git a/Rakefile b/Rakefile
index b6ba226..24e490b 100644
--- a/Rakefile
+++ b/Rakefile
@@ -47,7 +47,7 @@
end
def version
- "#{release_version}.0-alpha-1"
+ "#{release_version}.0-alpha-3"
end
# The build system used by webdriver is layered on top of rake, and we call it
@@ -113,6 +113,7 @@
'//java/client/src/org/openqa/selenium:core',
'//java/client/src/org/openqa/selenium/support:support',
'//java/client/src/org/openqa/selenium/chrome:chrome',
+ '//java/client/src/org/openqa/selenium/chromium:chromium',
'//java/client/src/org/openqa/selenium/edge:edge',
'//java/client/src/org/openqa/selenium/edge/edgehtml:edgehtml',
'//java/client/src/org/openqa/selenium/firefox:firefox',
@@ -124,7 +125,6 @@
'//java/client/src/org/openqa/selenium/safari:safari',
'//java/client/src/org/openqa/selenium:client-combined',
'//java/server/src/com/thoughtworks/selenium:leg-rc',
- '//java/server/src/org/openqa/grid/selenium:classes',
'//java/server/src/org/openqa/selenium/grid:grid',
'//third_party/java/jetty:jetty'
]
@@ -272,7 +272,6 @@
task :test_rb_local => [
"//rb:chrome-test",
"//rb:firefox-test",
- ("//rb:ff-esr-test" if ENV['FF_ESR_BINARY']),
("//rb:safari-preview-test" if mac?),
("//rb:safari-test" if mac?),
("//rb:ie-test" if windows?),
@@ -282,8 +281,6 @@
task :test_rb_remote => [
"//rb:remote-chrome-test",
"//rb:remote-firefox-test",
- ("//rb:remote-ff-esr-test" if ENV['FF_ESR_BINARY']),
- ("//rb:remote-safari-preview-test" if mac?),
("//rb:remote-safari-test" if mac?),
("//rb:remote-ie-test" if windows?),
("//rb:remote-edge-test" if windows?)
@@ -549,18 +546,21 @@
end
end
- task :deploy => [
- "node:atoms",
+ task :build do
+ sh "bazel build //javascript/node/selenium-webdriver"
+ end
+
+ task :'dry-run' => [
+ "node:build",
] do
- cmd = "node javascript/node/deploy.js" <<
- " --output=build/javascript/node/selenium-webdriver" <<
- " --resource=LICENSE:/LICENSE" <<
- " --resource=NOTICE:/NOTICE" <<
- " --resource=common/src/web/:test/data/" <<
- " --exclude_resource=common/src/web/Bin" <<
- " --exclude_resource=.gitignore" <<
- " --src=javascript/node/selenium-webdriver"
+ cmd = "bazel run javascript/node/selenium-webdriver:selenium-webdriver.pack"
+ sh cmd
+ end
+ task :deploy => [
+ "node:build",
+ ] do
+ cmd = "bazel run javascript/node/selenium-webdriver:selenium-webdriver.publish"
sh cmd
end
diff --git a/buildAutomation.sh b/buildAutomation.sh
index 4d5ada1..3be9dd0 100755
--- a/buildAutomation.sh
+++ b/buildAutomation.sh
@@ -31,7 +31,7 @@
cp -f third_party/java/bytebuddy/byte-buddy-1.9.12.jar $1/jar
cp -f buck-out/gen/third_party/java/commons/__commons-exec__/commons-exec-1.3.jar $1/jar
cp -f buck-out/gen/java/client/test/org/openqa/selenium/chrome/lib__chrome#testsjar__output/chrome#testsjar.jar $1/jar
- cp -f buck-out/gen/java/client/src/org/openqa/selenium/client-combined-4.0.0-alpha-2.jar $1/jar
+ cp -f buck-out/gen/java/client/src/org/openqa/selenium/client-combined-4.0.0-alpha-3.jar $1/jar
cp -f buck-out/gen/java/client/test/org/openqa/selenium/testing/drivers/lib__drivers__output/drivers.jar $1/jar
cp -f buck-out/gen/java/client/test/org/openqa/selenium/environment/lib__environment__output/environment.jar $1/jar
cp -f third_party/java/gson/gson-2.8.5.jar $1/jar
@@ -64,4 +64,5 @@
cp -f buck-out/gen/java/client/test/org/openqa/selenium/lib__tests__output/tests.jar $1/jar/tests-selenium.jar
cp -f buck-out/gen/java/client/test/org/openqa/selenium/support/lib__tests__output/tests.jar $1/jar/tests-support.jar
cp -f buck-out/gen/java/client/test/org/openqa/selenium/devtools/lib__devtools__output/devtools.jar $1/jar/devtools-test.jar
+ cp -f buck-out/gen/java/client/src/org/openqa/selenium/devtools/lib__devtools__output/devtools.jar $1/jar/devtools.jar
fi
diff --git a/common/src/web/BUILD.bazel b/common/src/web/BUILD.bazel
new file mode 100644
index 0000000..9581efb
--- /dev/null
+++ b/common/src/web/BUILD.bazel
@@ -0,0 +1,12 @@
+filegroup(
+ name = "web",
+ srcs = glob([
+ "*",
+ "**/*",
+ ]),
+ visibility = [
+ "//dotnet/test/common:__pkg__",
+ "//java/client/test/org/openqa/selenium/environment:__pkg__",
+ "//javascript/node/selenium-webdriver:__pkg__",
+ ],
+)
diff --git a/common/src/web/devToolsConsoleTest.html b/common/src/web/devToolsConsoleTest.html
new file mode 100644
index 0000000..24d15cc
--- /dev/null
+++ b/common/src/web/devToolsConsoleTest.html
@@ -0,0 +1,10 @@
+<html>
+ <head>
+ </head>
+
+ <body>
+
+ <p>Console Test</p>
+
+ </body>
+</html>
diff --git a/common/src/web/devToolsSecurityTest b/common/src/web/devToolsSecurityTest
new file mode 100644
index 0000000..7244bfa
--- /dev/null
+++ b/common/src/web/devToolsSecurityTest
@@ -0,0 +1,10 @@
+<html>
+<head>
+</head>
+
+<body>
+
+<p>Security Test</p>
+
+</body>
+</html>
diff --git a/common/src/web/screen/screen.css b/common/src/web/screen/screen.css
index 8152618..2ad37ce 100644
--- a/common/src/web/screen/screen.css
+++ b/common/src/web/screen/screen.css
@@ -1,7 +1,7 @@
* {
margin: 0;
}
-html, body, #output {
+#output {
width: 100%;
height: 100%;
}
diff --git a/common/src/web/simpleTest.html b/common/src/web/simpleTest.html
index 07f6d8b..399a009 100644
--- a/common/src/web/simpleTest.html
+++ b/common/src/web/simpleTest.html
@@ -95,7 +95,7 @@
<span id="trimmedSpace"> test </span>
<br/>
-<a id="capitalized" style="text-transform: capitalize">Hello, world! bla-bla-BLA</a><br/>
+<a id="capitalized" style="text-transform: capitalize">hello, world! bla-bla-BLA</a><br/>
<a id="lowercased" style="text-transform: lowercase">Hello, world! bla-bla-BLA</a><br/>
<a id="uppercased" style="text-transform: uppercase">Hello, world! bla-bla-BLA</a><br/>
diff --git a/common/src/web/xhtmlTest.html b/common/src/web/xhtmlTest.html
index d2f3a5d..b69ea2b 100644
--- a/common/src/web/xhtmlTest.html
+++ b/common/src/web/xhtmlTest.html
@@ -68,7 +68,7 @@
</span>
<div id="parent">I'm a parent
- <div id="child">I'm a child</div>
+ <div id="child" class="cls-!@#$%^&*">I'm a child</div>
</div>
<div id="only-exists-on-xhtmltest">Woo woo</div>
diff --git a/jar/build.jar b/jar/build.jar
index 58063ef..adb9eee 100644
--- a/jar/build.jar
+++ b/jar/build.jar
Binary files differ
diff --git a/jar/client-combined-4.0.0-alpha-2.jar b/jar/client-combined-4.0.0-alpha-3.jar
similarity index 88%
rename from jar/client-combined-4.0.0-alpha-2.jar
rename to jar/client-combined-4.0.0-alpha-3.jar
index 968206d..b98f2cf 100644
--- a/jar/client-combined-4.0.0-alpha-2.jar
+++ b/jar/client-combined-4.0.0-alpha-3.jar
Binary files differ
diff --git a/jar/devtools-test.jar b/jar/devtools-test.jar
index ec1b0fc..66aac71 100644
--- a/jar/devtools-test.jar
+++ b/jar/devtools-test.jar
Binary files differ
diff --git a/jar/devtools.jar b/jar/devtools.jar
new file mode 100644
index 0000000..7525ef4
--- /dev/null
+++ b/jar/devtools.jar
Binary files differ
diff --git a/jar/drivers.jar b/jar/drivers.jar
index 6b66656..bc9852d 100644
--- a/jar/drivers.jar
+++ b/jar/drivers.jar
Binary files differ
diff --git a/jar/environment.jar b/jar/environment.jar
index 66a1fd0..e7a7318 100644
--- a/jar/environment.jar
+++ b/jar/environment.jar
Binary files differ
diff --git a/jar/jetty-http-repacked.jar b/jar/jetty-http-repacked.jar
index 4ed0d5a..6c9679a 100644
--- a/jar/jetty-http-repacked.jar
+++ b/jar/jetty-http-repacked.jar
Binary files differ
diff --git a/jar/jetty-io-repacked.jar b/jar/jetty-io-repacked.jar
index 87c836f..01a3a76 100644
--- a/jar/jetty-io-repacked.jar
+++ b/jar/jetty-io-repacked.jar
Binary files differ
diff --git a/jar/jetty-security-repacked.jar b/jar/jetty-security-repacked.jar
index 5e69f32..82710bb 100644
--- a/jar/jetty-security-repacked.jar
+++ b/jar/jetty-security-repacked.jar
Binary files differ
diff --git a/jar/jetty-server-repacked.jar b/jar/jetty-server-repacked.jar
index d52da56..668dcf6 100644
--- a/jar/jetty-server-repacked.jar
+++ b/jar/jetty-server-repacked.jar
Binary files differ
diff --git a/jar/jetty-servlet-repacked.jar b/jar/jetty-servlet-repacked.jar
index 82fac08..eed3814 100644
--- a/jar/jetty-servlet-repacked.jar
+++ b/jar/jetty-servlet-repacked.jar
Binary files differ
diff --git a/jar/jetty-util-repacked.jar b/jar/jetty-util-repacked.jar
index 8d127a3..125d659 100644
--- a/jar/jetty-util-repacked.jar
+++ b/jar/jetty-util-repacked.jar
Binary files differ
diff --git a/jar/options-functional-tests.jar b/jar/options-functional-tests.jar
index 0e9646a..ac2da25 100644
--- a/jar/options-functional-tests.jar
+++ b/jar/options-functional-tests.jar
Binary files differ
diff --git a/jar/test-base.jar b/jar/test-base.jar
index ad054e8..e1a5b7c 100644
--- a/jar/test-base.jar
+++ b/jar/test-base.jar
Binary files differ
diff --git a/jar/tests-selenium.jar b/jar/tests-selenium.jar
index 5c21370..0d4526f 100644
--- a/jar/tests-selenium.jar
+++ b/jar/tests-selenium.jar
Binary files differ
diff --git a/seleniumHQ.patch b/seleniumHQ.patch
index c0c81b6..9049a69 100644
--- a/seleniumHQ.patch
+++ b/seleniumHQ.patch
@@ -76,10 +76,10 @@
private PortProber() {
// Utility class
diff --git a/java/client/test/org/openqa/selenium/CookieImplementationTest.java b/java/client/test/org/openqa/selenium/CookieImplementationTest.java
-index b6a883708f..89d1b8700a 100644
+index f9190bf475..f1b088e653 100644
--- a/java/client/test/org/openqa/selenium/CookieImplementationTest.java
+++ b/java/client/test/org/openqa/selenium/CookieImplementationTest.java
-@@ -386,6 +386,7 @@ public void canHandleSecureCookie() {
+@@ -385,6 +385,7 @@ public void canHandleSecureCookie() {
Cookie retrieved = driver.manage().getCookieNamed("fish");
assertThat(retrieved).isNotNull();
@@ -165,10 +165,10 @@
private void changeSizeBy(int deltaX, int deltaY) {
diff --git a/java/client/test/org/openqa/selenium/chrome/ChromeOptionsFunctionalTest.java b/java/client/test/org/openqa/selenium/chrome/ChromeOptionsFunctionalTest.java
-index 232718f92b..3df6752a3a 100644
+index 66544a3391..db40fdf945 100644
--- a/java/client/test/org/openqa/selenium/chrome/ChromeOptionsFunctionalTest.java
+++ b/java/client/test/org/openqa/selenium/chrome/ChromeOptionsFunctionalTest.java
-@@ -52,6 +52,7 @@ public void tearDown() {
+@@ -55,6 +55,7 @@ public void tearDown() {
public void canStartChromeWithCustomOptions() {
ChromeOptions options = new ChromeOptions();
options.addArguments("user-agent=foo;bar");
@@ -176,15 +176,15 @@
driver = new ChromeDriver(options);
driver.get(pages.clickJacker);
-@@ -74,6 +75,7 @@ public void optionsStayEqualAfterSerialization() {
+@@ -77,6 +78,7 @@ public void optionsStayEqualAfterSerialization() {
public void canSetAcceptInsecureCerts() {
ChromeOptions options = new ChromeOptions();
options.setAcceptInsecureCerts(true);
+ setWebDriverChromeBinary(options);
driver = new ChromeDriver(options);
- assertThat(driver.getCapabilities().getCapability(ACCEPT_SSL_CERTS)).isEqualTo(true);
-@@ -84,6 +86,7 @@ public void canSetAcceptInsecureCerts() {
+ assertThat(driver.getCapabilities().getCapability(ACCEPT_INSECURE_CERTS)).isEqualTo(true);
+@@ -87,6 +89,7 @@ public void canSetAcceptInsecureCerts() {
public void canAddExtensionFromFile() {
ChromeOptions options = new ChromeOptions();
options.addExtensions(InProject.locate(EXT_PATH).toFile());
@@ -192,7 +192,7 @@
driver = new ChromeDriver(options);
driver.get(pages.clicksPage);
-@@ -101,6 +104,7 @@ public void canAddExtensionFromStringEncodedInBase64() throws IOException {
+@@ -104,6 +107,7 @@ public void canAddExtensionFromStringEncodedInBase64() throws IOException {
ChromeOptions options = new ChromeOptions();
options.addEncodedExtensions(Base64.getEncoder().encodeToString(
Files.readAllBytes(InProject.locate(EXT_PATH))));
@@ -200,7 +200,7 @@
driver = new ChromeDriver(options);
driver.get(pages.clicksPage);
-@@ -112,4 +116,10 @@ public void canAddExtensionFromStringEncodedInBase64() throws IOException {
+@@ -115,4 +119,10 @@ public void canAddExtensionFromStringEncodedInBase64() throws IOException {
new WebDriverWait(driver, 10).until(titleIs("clicks"));
}
@@ -211,58 +211,13 @@
+ }
+ }
}
-diff --git a/java/client/test/org/openqa/selenium/devtools/ChromeDevToolsTestBase.java b/java/client/test/org/openqa/selenium/devtools/ChromeDevToolsTestBase.java
-index e3f55ce130..bc8658e532 100644
---- a/java/client/test/org/openqa/selenium/devtools/ChromeDevToolsTestBase.java
-+++ b/java/client/test/org/openqa/selenium/devtools/ChromeDevToolsTestBase.java
-@@ -20,6 +20,9 @@
- import org.junit.After;
- import org.junit.Before;
- import org.openqa.selenium.chrome.ChromeDriver;
-+import org.openqa.selenium.chrome.ChromeOptions;
-+
-+import java.io.File;
-
- /**
- * Created by aohana
-@@ -33,7 +36,13 @@ public void setUp() {
-
- super.setUp();
-
-- chromeDriver = new ChromeDriver();
-+ ChromeOptions options = new ChromeOptions();
-+ String chromePath = System.getProperty("webdriver.chrome.binary");
-+ if (chromePath != null) {
-+ options.setBinary(new File(chromePath));
-+ }
-+
-+ chromeDriver = new ChromeDriver(options);
- devTools = chromeDriver.getDevTools();
-
- devTools.createSession();
-diff --git a/java/client/test/org/openqa/selenium/devtools/DevToolsTestBase.java b/java/client/test/org/openqa/selenium/devtools/DevToolsTestBase.java
-index a1f7ce8d6f..9cb884785b 100644
---- a/java/client/test/org/openqa/selenium/devtools/DevToolsTestBase.java
-+++ b/java/client/test/org/openqa/selenium/devtools/DevToolsTestBase.java
-@@ -23,9 +23,10 @@
- import org.openqa.selenium.environment.TestEnvironment;
- import org.openqa.selenium.environment.webserver.AppServer;
- import org.openqa.selenium.testing.Pages;
-+import org.openqa.selenium.testing.JUnit4TestBase;
-
-
--public abstract class DevToolsTestBase {
-+public abstract class DevToolsTestBase extends JUnit4TestBase {
-
- DevTools devTools;
- protected TestEnvironment environment;
diff --git a/java/client/test/org/openqa/selenium/environment/webserver/JettyAppServer.java b/java/client/test/org/openqa/selenium/environment/webserver/JettyAppServer.java
-index 4d943e35e6..affeaaf838 100644
+index a3b89d43c5..1195c3046e 100644
--- a/java/client/test/org/openqa/selenium/environment/webserver/JettyAppServer.java
+++ b/java/client/test/org/openqa/selenium/environment/webserver/JettyAppServer.java
-@@ -117,10 +117,6 @@ public JettyAppServer(String hostName, int httpPort, int httpsPort) {
- ServletContextHandler defaultContext = addResourceHandler(
- DEFAULT_CONTEXT_PATH, webSrc);
+@@ -124,10 +124,6 @@ public JettyAppServer(String hostName, int httpPort, int httpsPort) {
+ addResourceHandler(FILEZ_CONTEXT_PATH, runfiles);
+ }
- addJsResourceHandler(JS_SRC_CONTEXT_PATH, "javascript");
- addJsResourceHandler(CLOSURE_CONTEXT_PATH, "third_party/closure/goog");
@@ -272,10 +227,10 @@
tempPageDir = tempFs.createTempDir("pages", "test");
addResourceHandler(TEMP_SRC_CONTEXT_PATH, tempPageDir.toPath());
diff --git a/java/client/test/org/openqa/selenium/interactions/BasicKeyboardInterfaceTest.java b/java/client/test/org/openqa/selenium/interactions/BasicKeyboardInterfaceTest.java
-index f79ae7d559..db33271998 100644
+index c19a310a4e..87c92f215c 100644
--- a/java/client/test/org/openqa/selenium/interactions/BasicKeyboardInterfaceTest.java
+++ b/java/client/test/org/openqa/selenium/interactions/BasicKeyboardInterfaceTest.java
-@@ -231,6 +231,8 @@ public void testSelectionSelectBySymbol() {
+@@ -233,6 +233,8 @@ public void testSelectionSelectBySymbol() {
shortWait.until(ExpectedConditions.attributeToBe(input, "value", "abc def"));
@@ -284,7 +239,7 @@
getBuilder(driver).click(input)
.keyDown(Keys.SHIFT)
.sendKeys(Keys.LEFT)
-@@ -257,6 +259,8 @@ public void testSelectionSelectByWord() {
+@@ -260,6 +262,8 @@ public void testSelectionSelectByWord() {
getBuilder(driver).click(input).sendKeys("abc def").perform();
wait.until(ExpectedConditions.attributeToBe(input, "value", "abc def"));
@@ -294,10 +249,10 @@
.keyDown(Keys.SHIFT)
.keyDown(Keys.CONTROL)
diff --git a/java/client/test/org/openqa/selenium/interactions/BasicMouseInterfaceTest.java b/java/client/test/org/openqa/selenium/interactions/BasicMouseInterfaceTest.java
-index 76d3028af6..55152f77dd 100644
+index f3ab0da284..a37eecf5ff 100644
--- a/java/client/test/org/openqa/selenium/interactions/BasicMouseInterfaceTest.java
+++ b/java/client/test/org/openqa/selenium/interactions/BasicMouseInterfaceTest.java
-@@ -376,7 +376,7 @@ public void testMovingMouseToRelativeElementOffset() {
+@@ -377,7 +377,7 @@ public void testMovingMouseToRelativeElementOffset() {
driver.get(pages.mouseTrackerPage);
WebElement trackerDiv = driver.findElement(By.id("mousetracker"));
@@ -306,7 +261,7 @@
WebElement reporter = driver.findElement(By.id("status"));
-@@ -392,7 +392,7 @@ public void testMovingMouseToRelativeZeroElementOffset() {
+@@ -394,7 +394,7 @@ public void testMovingMouseToRelativeZeroElementOffset() {
driver.get(pages.mouseTrackerPage);
WebElement trackerDiv = driver.findElement(By.id("mousetracker"));
@@ -315,7 +270,7 @@
WebElement reporter = driver.findElement(By.id("status"));
-@@ -433,15 +433,16 @@ public void testMoveMouseByOffsetOverAndOutOfAnElement() {
+@@ -436,15 +436,16 @@ public void testMoveMouseByOffsetOverAndOutOfAnElement() {
int shiftX = redboxPosition.getX() - greenboxPosition.getX();
int shiftY = redboxPosition.getY() - greenboxPosition.getY();
@@ -335,7 +290,7 @@
.moveByOffset(shiftX, shiftY)
.moveByOffset(-shiftX, -shiftY).perform();
-@@ -459,8 +460,9 @@ public void testCanMoveOverAndOutOfAnElement() {
+@@ -463,8 +464,9 @@ public void testCanMoveOverAndOutOfAnElement() {
WebElement greenbox = driver.findElement(By.id("greenbox"));
WebElement redbox = driver.findElement(By.id("redbox"));
Dimension size = redbox.getSize();
@@ -346,7 +301,7 @@
assertThat(Color.fromString(redbox.getCssValue("background-color")))
.isEqualTo(GREEN.getColorValue());
-@@ -471,7 +473,7 @@ public void testCanMoveOverAndOutOfAnElement() {
+@@ -475,7 +477,7 @@ public void testCanMoveOverAndOutOfAnElement() {
// IE8 (and *only* IE8) requires a move of 2 pixels. All other browsers
// would be happy with 1.
@@ -356,10 +311,10 @@
wait.until(attributeToBe(redbox, "background-color", Colors.GREEN.getColorValue().asRgba()));
diff --git a/java/client/test/org/openqa/selenium/interactions/CombinedInputActionsTest.java b/java/client/test/org/openqa/selenium/interactions/CombinedInputActionsTest.java
-index db1bdb6a73..ec2e2a0bb4 100644
+index 25d476dab3..e6ebb05217 100644
--- a/java/client/test/org/openqa/selenium/interactions/CombinedInputActionsTest.java
+++ b/java/client/test/org/openqa/selenium/interactions/CombinedInputActionsTest.java
-@@ -46,6 +46,7 @@
+@@ -47,6 +47,7 @@
import org.openqa.selenium.testing.JUnit4TestBase;
import org.openqa.selenium.testing.NotYetImplemented;
import org.openqa.selenium.testing.SwitchToTopAfterTest;
@@ -367,7 +322,7 @@
import java.util.List;
-@@ -226,10 +227,11 @@ public void testClickAfterMoveToAnElementWithAnOffsetShouldUseLastMousePosition(
+@@ -228,10 +229,11 @@ public void testClickAfterMoveToAnElementWithAnOffsetShouldUseLastMousePosition(
driver.get(pages.clickEventPage);
WebElement element = driver.findElement(By.id("eventish"));
@@ -545,26 +500,26 @@
private boolean isIgnoredBecauseOfJUnit4Ignore(org.junit.Ignore annotation) {
diff --git a/java/client/test/org/openqa/selenium/testing/drivers/TestChromeDriver.java b/java/client/test/org/openqa/selenium/testing/drivers/TestChromeDriver.java
-index 6177c2a4bc..8b10ff727f 100644
+index 0722d58357..c60a09d41a 100644
--- a/java/client/test/org/openqa/selenium/testing/drivers/TestChromeDriver.java
+++ b/java/client/test/org/openqa/selenium/testing/drivers/TestChromeDriver.java
-@@ -61,13 +61,11 @@ public TestChromeDriver(Capabilities capabilities) {
- private static URL getServiceUrl() {
+@@ -46,13 +46,11 @@ public TestChromeDriver(Capabilities capabilities) {
+
+ private static ChromeDriverService getService() {
try {
- if (service == null) {
-- Path logFile = Files.createTempFile("chromedriver", ".log");
- service = new ChromeDriverService.Builder()
- .withVerbose(true)
-- .withLogFile(logFile.toFile())
- .build();
-- LOG.info("chromedriver will log to " + logFile);
- service.start();
-+ System.clearProperty("webdriver.chrome.logfile");
- // Fugly.
- Runtime.getRuntime().addShutdownHook(new Thread(() -> service.stop()));
- }
-@@ -80,15 +78,39 @@ private static URL getServiceUrl() {
- private static Capabilities chromeWithCustomCapabilities(Capabilities originalCapabilities) {
+- Path logFile = Files.createTempFile("chromedriver", ".log");
+ ChromeDriverService service = new ChromeDriverService.Builder()
+ .withVerbose(true)
+- .withLogFile(logFile.toFile())
+ .build();
+- LOG.info("chromedriver will log to " + logFile);
+ service.start();
++ System.clearProperty("webdriver.chrome.logfile");
+ // Fugly.
+ Runtime.getRuntime().addShutdownHook(new Thread(service::stop));
+ return service;
+@@ -64,15 +62,39 @@ private static ChromeDriverService getService() {
+ private static ChromeOptions chromeWithCustomCapabilities(Capabilities originalCapabilities) {
ChromeOptions options = new ChromeOptions();
options.addArguments("disable-extensions", "disable-infobars", "disable-breakpad");
- Map<String, Object> prefs = new HashMap<>();