[ChromeDriver] Update Selenium tests code to latest revision
Change-Id: Ic6830d12642d5acf3088eee2ccfc2dda4c1f1a8d
diff --git a/README.chromium b/README.chromium
index f1fb9ba..671458e 100644
--- a/README.chromium
+++ b/README.chromium
@@ -2,7 +2,7 @@
Short Name: WebDriver
URL: https://github.com/SeleniumHQ/selenium
Version: 3.14
-Revision: 3f8670ddf1fd033c00732ae64ace2254f8cf4f41
+Revision: 2528532d0f8d64bbb9ac1bb0a760124d0eb7010e
License: Apache 2.0,
License File: https://github.com/SeleniumHQ/selenium/blob/master/LICENSE
Security Critical: no
diff --git a/Rakefile b/Rakefile
index 151089d..05ba523 100644
--- a/Rakefile
+++ b/Rakefile
@@ -21,7 +21,6 @@
require 'rake-tasks/crazy_fun/mappings/gcc'
require 'rake-tasks/crazy_fun/mappings/javascript'
require 'rake-tasks/crazy_fun/mappings/jruby'
-require 'rake-tasks/crazy_fun/mappings/mozilla'
require 'rake-tasks/crazy_fun/mappings/python'
require 'rake-tasks/crazy_fun/mappings/rake'
require 'rake-tasks/crazy_fun/mappings/rename'
@@ -48,7 +47,7 @@
end
def version
- "#{release_version}.5"
+ "#{release_version}.59"
end
# The build system used by webdriver is layered on top of rake, and we call it
@@ -73,7 +72,6 @@
GccMappings.new.add_all(crazy_fun)
JavascriptMappings.new.add_all(crazy_fun)
JRubyMappings.new.add_all(crazy_fun)
-MozillaMappings.new.add_all(crazy_fun)
PythonMappings.new.add_all(crazy_fun)
RakeMappings.new.add_all(crazy_fun)
RenameMappings.new.add_all(crazy_fun)
@@ -117,6 +115,7 @@
'//java/client/src/org/openqa/selenium/chrome:chrome',
'//java/client/src/org/openqa/selenium/edge:edge',
'//java/client/src/org/openqa/selenium/firefox:firefox',
+ '//java/client/src/org/openqa/selenium/firefox/xpi:firefox-xpi',
'//java/client/src/org/openqa/selenium/ie:ie',
'//java/client/src/org/openqa/selenium/lift:lift',
'//java/client/src/org/openqa/selenium/opera:opera',
@@ -125,10 +124,13 @@
'//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:module',
'//third_party/java/jetty:jetty'
]
+
+
# Notice that because we're using rake, anything you can do in a normal rake
# build can also be done here. For example, here we set the default task
task :default => [:test]
@@ -404,7 +406,7 @@
file "build/javascript/deps.js" => FileList[
"third_party/closure/goog/**/*.js",
- "third_party/js/wgxpath/**/*.js",
+ "third_party/js/wgxpath/**/*.js",
"javascript/*/**/*.js", # Don't depend on js files directly in javascript/
] do
@@ -559,6 +561,30 @@
end
end
+namespace :side do
+ task :atoms => [
+ "//javascript/atoms/fragments:find-element",
+ ] do
+ # TODO: move directly to IDE's directory once the repositories are merged
+ baseDir = "build/javascript/atoms"
+ mkdir_p baseDir
+
+ [
+ Rake::Task["//javascript/atoms/fragments:find-element"].out,
+ ].each do |atom|
+ name = File.basename(atom)
+
+ puts "Generating #{atom} as #{name}"
+ File.open(File.join(baseDir, name), "w") do |f|
+ f << "// GENERATED CODE - DO NOT EDIT\n"
+ f << "module.exports = "
+ f << IO.read(atom).strip
+ f << ";\n"
+ end
+ end
+ end
+end
+
namespace :safari do
desc "Build the SafariDriver java client"
task :build => [
@@ -576,7 +602,6 @@
Copyright.Update(
FileList["javascript/**/*.js"].exclude(
"javascript/atoms/test/jquery.min.js",
- "javascript/firefox-driver/extension/components/httpd.js",
"javascript/jsunit/**/*.js",
"javascript/node/selenium-webdriver/node_modules/**/*.js",
"javascript/selenium-core/lib/**/*.js",
@@ -590,16 +615,10 @@
:style => "#")
Copyright.Update(
FileList["rb/**/*.rb"],
- :style => "#")
+ :style => "#",
+ :prefix => ["# frozen_string_literal: true\n", "\n"])
Copyright.Update(
- FileList["java/**/*.java"].exclude(
- "java/client/src/org/openqa/selenium/internal/Base64Encoder.java",
- "java/client/test/org/openqa/selenium/internal/Base64EncoderTest.java",
- "java/server/src/cybervillains/**/*.java",
- "java/server/src/org/openqa/selenium/server/FrameGroupCommandQueueSet.java",
- "java/server/src/org/openqa/selenium/server/FutureFileResource.java",
- "java/server/src/org/openqa/selenium/server/ProxyHandler.java"
- ))
+ FileList["java/**/*.java"])
end
end
diff --git a/buildAutomation.sh b/buildAutomation.sh
index d23d9fa..1e53db2 100755
--- a/buildAutomation.sh
+++ b/buildAutomation.sh
@@ -11,6 +11,7 @@
echo "~/chromium/src/chrome/test/chromedriver/third_party/java_tests"
else
./go //java/client/test/org/openqa/selenium/chrome:chrome
+ ./go //java/client/src/org/openqa/selenium:client-combined-zip
java_keystore="java/client/test/org/openqa/selenium/environment/webserver"
rm -rf $1/jar/
mkdir $1/jar/
@@ -24,28 +25,42 @@
cp -rf common $1
cp -f Rakefile $1
cp -f buck-out/gen/java/client/test/org/openqa/selenium/testing/lib__annotations__output/annotations.jar $1/jar
+ cp -f third_party/java/assertj/assertj-core-3.12.2.jar $1/jar
cp -f buck-out/gen/java/client/test/org/openqa/selenium/testing/drivers/lib__browser__output/browser.jar $1/jar
+ cp -f buck-out/gen/java/client/test/org/openqa/selenium/build/lib__build__output/build.jar $1/jar
+ 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-1.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
+ cp -f buck-out/gen/third_party/java/guava/__guava__/guava-27.1-jre.jar $1/jar
cp -f third_party/java/hamcrest/hamcrest-core-1.3.jar $1/jar
cp -f third_party/java/hamcrest/hamcrest-library-1.3.jar $1/jar
cp -f buck-out/gen/java/client/test/org/openqa/selenium/lib__helpers__output/helpers.jar $1/jar/helpers-selenium.jar
- cp -f buck-out/gen/java/client/test/org/openqa/selenium/testing/lib__helpers__output/helpers.jar $1/jar/helpers-testing.jar
+ cp -f buck-out/gen/third_party/java/htmlunit/__htmlunit__/htmlunit-2.34.1.jar $1/jar
+ cp -f buck-out/gen/third_party/java/htmlunit/__htmlunit-cssparser__/htmlunit-cssparser-1.3.0.jar $1/jar
+ cp -f buck-out/gen/third_party/java/selenium/__htmlunit-driver__/htmlunit-driver-2.33.4-SNAPSHOT.jar $1/jar
+ cp -f third_party/java/servlet/javax.servlet-api-3.1.0.jar $1/jar
+ cp -f buck-out/gen/third_party/java/jetty/jetty-http-do-repack/jetty-http-repacked.jar $1/jar
+ cp -f buck-out/gen/third_party/java/jetty/jetty-io-do-repack/jetty-io-repacked.jar $1/jar
+ cp -f buck-out/gen/third_party/java/jetty/jetty-security-do-repack/jetty-security-repacked.jar $1/jar
+ cp -f buck-out/gen/third_party/java/jetty/jetty-server-do-repack/jetty-server-repacked.jar $1/jar
+ cp -f buck-out/gen/third_party/java/jetty/jetty-servlet-do-repack/jetty-servlet-repacked.jar $1/jar
+ cp -f buck-out/gen/third_party/java/jetty/jetty-util-do-repack/jetty-util-repacked.jar $1/jar
cp -f third_party/java/junit/junit-4.12.jar $1/jar
cp -f buck-out/gen/java/client/test/org/openqa/selenium/lib__large-tests__output/large-tests.jar $1/jar
- cp -f third_party/java/mockito/mockito-core-2.18.0.jar $1/jar
+ cp -f third_party/java/littleshoot/littleproxy-1.1.3-SNAPSHOT.jar $1/jar
+ cp -f third_party/java/mockito/mockito-core-2.26.0.jar $1/jar
cp -f third_party/java/netty/netty-all-4.1.25.Final.jar $1/jar
- cp -f third_party/java/objenesis/objenesis-2.6.jar $1/jar
- cp -f buck-out/gen/java/server/src/org/openqa/grid/selenium/selenium.jar $1/jar
+ cp -f third_party/java/objenesis/objenesis-3.0.1.jar $1/jar
+ cp -f buck-out/gen/third_party/java/okhttp3/__okhttp__/okhttp-3.14.0.jar $1/jar
+ cp -f buck-out/gen/third_party/java/okio/__okio__/okio-1.17.3.jar $1/jar
cp -f third_party/java/slf4j/slf4j-api-1.7.25.jar $1/jar
cp -f third_party/java/slf4j/slf4j-jdk14-1.7.25.jar $1/jar
cp -f buck-out/gen/java/client/test/org/openqa/selenium/testing/lib__test-base__output/test-base.jar $1/jar
cp -f buck-out/gen/java/client/test/org/openqa/selenium/chrome/lib__tests__output/tests.jar $1/jar//options-functional-tests.jar
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 third_party/java/assertj/assertj-core-3.11.1.jar $1/jar
- cp -f third_party/java/gson/gson-2.8.4.jar $1/jar
- cp -f third_party/java/littleshoot/littleproxy-1.1.3-SNAPSHOT.jar $1/jar
- cp -f buck-out/gen/third_party/java/selenium/__htmlunit-driver__/htmlunit-driver-2.32.2-SNAPSHOT.jar $1/jar
fi
diff --git a/common/src/web/upload_hidden.html b/common/src/web/upload_hidden.html
new file mode 100644
index 0000000..ff10931
--- /dev/null
+++ b/common/src/web/upload_hidden.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Upload Form</title>
+ <script>
+ var intervalId;
+ function onTick() {
+ var label = document.getElementById('upload_label');
+ label.innerHTML += '.';
+ }
+
+ function onUploadSubmit() {
+ document.getElementById('upload_target').contentWindow.document.body.
+ innerHTML = '';
+ var label = document.getElementById('upload_label');
+ label.innerHTML = 'Uploading "' + document.forms[0].upload.value + '"';
+ label.style.display = '';
+ intervalId = window.setInterval(onTick, 500);
+ return true;
+ }
+
+ function onUploadDone() {
+ var label = document.getElementById('upload_label');
+ label.style.display = 'none';
+ window.clearInterval(intervalId);
+ return true;
+ }
+ </script>
+</head>
+<body>
+<form action="/common/upload" method="post" name="upload_form"
+ target="upload_target" enctype="multipart/form-data"
+ onsubmit="onUploadSubmit();">
+ <div style='height: 0; width: 0; overflow: hidden;'>
+ <div><input id="upload" name="upload" type="file"/></div>
+ </div>
+ <label id="visible_label" for="upload">Upload</label>
+ <div><input id="go" type="submit" value="Go!"/></div>
+ <div id="upload_label" style="display:none"></div>
+ <iframe src="" id="upload_target" name="upload_target"
+ style="width:300px;height:200px">
+ </iframe>
+</form>
+</body>
+</html>
diff --git a/common/src/web/upload_invisible.html b/common/src/web/upload_invisible.html
index ff10931..328cbd2 100644
--- a/common/src/web/upload_invisible.html
+++ b/common/src/web/upload_invisible.html
@@ -31,7 +31,7 @@
<form action="/common/upload" method="post" name="upload_form"
target="upload_target" enctype="multipart/form-data"
onsubmit="onUploadSubmit();">
- <div style='height: 0; width: 0; overflow: hidden;'>
+ <div style='height: 0; width: 0; display: none;'>
<div><input id="upload" name="upload" type="file"/></div>
</div>
<label id="visible_label" for="upload">Upload</label>
diff --git a/jar/annotations.jar b/jar/annotations.jar
index c1f0385..98cadae 100644
--- a/jar/annotations.jar
+++ b/jar/annotations.jar
Binary files differ
diff --git a/jar/assertj-core-3.11.1.jar b/jar/assertj-core-3.11.1.jar
deleted file mode 100644
index 87e5ee3..0000000
--- a/jar/assertj-core-3.11.1.jar
+++ /dev/null
Binary files differ
diff --git a/jar/assertj-core-3.12.2.jar b/jar/assertj-core-3.12.2.jar
new file mode 100644
index 0000000..8318418
--- /dev/null
+++ b/jar/assertj-core-3.12.2.jar
Binary files differ
diff --git a/jar/browser.jar b/jar/browser.jar
index 51eb560..af0047a 100644
--- a/jar/browser.jar
+++ b/jar/browser.jar
Binary files differ
diff --git a/jar/build.jar b/jar/build.jar
new file mode 100644
index 0000000..55576b9
--- /dev/null
+++ b/jar/build.jar
Binary files differ
diff --git a/jar/byte-buddy-1.9.12.jar b/jar/byte-buddy-1.9.12.jar
new file mode 100644
index 0000000..7e2584b
--- /dev/null
+++ b/jar/byte-buddy-1.9.12.jar
Binary files differ
diff --git a/jar/client-combined-4.0.0-alpha-1.jar b/jar/client-combined-4.0.0-alpha-1.jar
new file mode 100644
index 0000000..4176d85
--- /dev/null
+++ b/jar/client-combined-4.0.0-alpha-1.jar
Binary files differ
diff --git a/jar/commons-exec-1.3.jar b/jar/commons-exec-1.3.jar
new file mode 100644
index 0000000..9a64351
--- /dev/null
+++ b/jar/commons-exec-1.3.jar
Binary files differ
diff --git a/jar/drivers.jar b/jar/drivers.jar
index 249d6bf..a267689 100644
--- a/jar/drivers.jar
+++ b/jar/drivers.jar
Binary files differ
diff --git a/jar/environment.jar b/jar/environment.jar
index 9372c9d..bc7ffab 100644
--- a/jar/environment.jar
+++ b/jar/environment.jar
Binary files differ
diff --git a/jar/gson-2.8.4.jar b/jar/gson-2.8.5.jar
similarity index 81%
rename from jar/gson-2.8.4.jar
rename to jar/gson-2.8.5.jar
index 41bae96..0d5baf3 100644
--- a/jar/gson-2.8.4.jar
+++ b/jar/gson-2.8.5.jar
Binary files differ
diff --git a/jar/guava-27.1-jre.jar b/jar/guava-27.1-jre.jar
new file mode 100644
index 0000000..b9b2124
--- /dev/null
+++ b/jar/guava-27.1-jre.jar
Binary files differ
diff --git a/jar/helpers-selenium.jar b/jar/helpers-selenium.jar
index e00ca4e..be5c26f 100644
--- a/jar/helpers-selenium.jar
+++ b/jar/helpers-selenium.jar
Binary files differ
diff --git a/jar/helpers-testing.jar b/jar/helpers-testing.jar
deleted file mode 100644
index 926f611..0000000
--- a/jar/helpers-testing.jar
+++ /dev/null
Binary files differ
diff --git a/jar/htmlunit-2.34.1.jar b/jar/htmlunit-2.34.1.jar
new file mode 100644
index 0000000..6811622
--- /dev/null
+++ b/jar/htmlunit-2.34.1.jar
Binary files differ
diff --git a/jar/htmlunit-cssparser-1.3.0.jar b/jar/htmlunit-cssparser-1.3.0.jar
new file mode 100644
index 0000000..ac1f085
--- /dev/null
+++ b/jar/htmlunit-cssparser-1.3.0.jar
Binary files differ
diff --git a/jar/htmlunit-driver-2.32.2-SNAPSHOT.jar b/jar/htmlunit-driver-2.32.2-SNAPSHOT.jar
deleted file mode 100644
index 8d95294..0000000
--- a/jar/htmlunit-driver-2.32.2-SNAPSHOT.jar
+++ /dev/null
Binary files differ
diff --git a/jar/htmlunit-driver-2.33.4-SNAPSHOT.jar b/jar/htmlunit-driver-2.33.4-SNAPSHOT.jar
new file mode 100644
index 0000000..88db17a
--- /dev/null
+++ b/jar/htmlunit-driver-2.33.4-SNAPSHOT.jar
Binary files differ
diff --git a/jar/javax.servlet-api-3.1.0.jar b/jar/javax.servlet-api-3.1.0.jar
new file mode 100644
index 0000000..6b14c3d
--- /dev/null
+++ b/jar/javax.servlet-api-3.1.0.jar
Binary files differ
diff --git a/jar/jetty-http-repacked.jar b/jar/jetty-http-repacked.jar
new file mode 100644
index 0000000..4ed0d5a
--- /dev/null
+++ b/jar/jetty-http-repacked.jar
Binary files differ
diff --git a/jar/jetty-io-repacked.jar b/jar/jetty-io-repacked.jar
new file mode 100644
index 0000000..87c836f
--- /dev/null
+++ b/jar/jetty-io-repacked.jar
Binary files differ
diff --git a/jar/jetty-security-repacked.jar b/jar/jetty-security-repacked.jar
new file mode 100644
index 0000000..5e69f32
--- /dev/null
+++ b/jar/jetty-security-repacked.jar
Binary files differ
diff --git a/jar/jetty-server-repacked.jar b/jar/jetty-server-repacked.jar
new file mode 100644
index 0000000..d52da56
--- /dev/null
+++ b/jar/jetty-server-repacked.jar
Binary files differ
diff --git a/jar/jetty-servlet-repacked.jar b/jar/jetty-servlet-repacked.jar
new file mode 100644
index 0000000..82fac08
--- /dev/null
+++ b/jar/jetty-servlet-repacked.jar
Binary files differ
diff --git a/jar/jetty-util-repacked.jar b/jar/jetty-util-repacked.jar
new file mode 100644
index 0000000..8d127a3
--- /dev/null
+++ b/jar/jetty-util-repacked.jar
Binary files differ
diff --git a/jar/mockito-core-2.18.0.jar b/jar/mockito-core-2.18.0.jar
deleted file mode 100644
index ad2a5a1..0000000
--- a/jar/mockito-core-2.18.0.jar
+++ /dev/null
Binary files differ
diff --git a/jar/mockito-core-2.26.0.jar b/jar/mockito-core-2.26.0.jar
new file mode 100644
index 0000000..c1f9c6c
--- /dev/null
+++ b/jar/mockito-core-2.26.0.jar
Binary files differ
diff --git a/jar/objenesis-2.6.jar b/jar/objenesis-2.6.jar
deleted file mode 100644
index b4b29d5..0000000
--- a/jar/objenesis-2.6.jar
+++ /dev/null
Binary files differ
diff --git a/jar/objenesis-3.0.1.jar b/jar/objenesis-3.0.1.jar
new file mode 100644
index 0000000..8521c84
--- /dev/null
+++ b/jar/objenesis-3.0.1.jar
Binary files differ
diff --git a/jar/okhttp-3.14.0.jar b/jar/okhttp-3.14.0.jar
new file mode 100644
index 0000000..0980d77
--- /dev/null
+++ b/jar/okhttp-3.14.0.jar
Binary files differ
diff --git a/jar/okio-1.17.3.jar b/jar/okio-1.17.3.jar
new file mode 100644
index 0000000..617bc08
--- /dev/null
+++ b/jar/okio-1.17.3.jar
Binary files differ
diff --git a/jar/options-functional-tests.jar b/jar/options-functional-tests.jar
index 0c2c02e..a5d4c02 100644
--- a/jar/options-functional-tests.jar
+++ b/jar/options-functional-tests.jar
Binary files differ
diff --git a/jar/selenium.jar b/jar/selenium.jar
deleted file mode 100644
index a4bf464..0000000
--- a/jar/selenium.jar
+++ /dev/null
Binary files differ
diff --git a/jar/test-base.jar b/jar/test-base.jar
index ed0ccb8..3a987ef 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 8c93c76..4dfba12 100644
--- a/jar/tests-selenium.jar
+++ b/jar/tests-selenium.jar
Binary files differ
diff --git a/jar/tests-support.jar b/jar/tests-support.jar
index 895f2ef..3d7fc7f 100644
--- a/jar/tests-support.jar
+++ b/jar/tests-support.jar
Binary files differ
diff --git a/seleniumHQ.patch b/seleniumHQ.patch
index 5ff2827..58a7575 100644
--- a/seleniumHQ.patch
+++ b/seleniumHQ.patch
@@ -1,8 +1,8 @@
diff --git a/java/client/src/org/openqa/selenium/chrome/ChromeOptions.java b/java/client/src/org/openqa/selenium/chrome/ChromeOptions.java
-index b4a5ebde80..1a0f1869d3 100644
+index 2a72c55ab7..4cfabe2510 100644
--- a/java/client/src/org/openqa/selenium/chrome/ChromeOptions.java
+++ b/java/client/src/org/openqa/selenium/chrome/ChromeOptions.java
-@@ -77,6 +77,9 @@
+@@ -70,6 +70,9 @@
public static final String CAPABILITY = "goog:chromeOptions";
private String binary;
@@ -12,7 +12,7 @@
private List<String> args = new ArrayList<>();
private List<File> extensionFiles = new ArrayList<>();
private List<String> extensions = new ArrayList<>();
-@@ -116,6 +119,36 @@ public ChromeOptions setBinary(String path) {
+@@ -109,6 +112,36 @@ public ChromeOptions setBinary(String path) {
return this;
}
@@ -50,10 +50,10 @@
* @param arguments The arguments to use when starting Chrome.
* @see #addArguments(java.util.List)
diff --git a/java/client/src/org/openqa/selenium/net/PortProber.java b/java/client/src/org/openqa/selenium/net/PortProber.java
-index 37897faa5d..be2c6a7ab5 100644
+index 3aee1e5c70..758898b2e1 100644
--- a/java/client/src/org/openqa/selenium/net/PortProber.java
+++ b/java/client/src/org/openqa/selenium/net/PortProber.java
-@@ -50,7 +50,7 @@
+@@ -49,7 +49,7 @@
}
public static final int HIGHEST_PORT = 65535;
@@ -63,10 +63,10 @@
private PortProber() {
// Utility class
diff --git a/java/client/test/org/openqa/selenium/WindowTest.java b/java/client/test/org/openqa/selenium/WindowTest.java
-index 5021b79e8b..68e54f34ae 100644
+index 574a794d52..a5c0e2674f 100644
--- a/java/client/test/org/openqa/selenium/WindowTest.java
+++ b/java/client/test/org/openqa/selenium/WindowTest.java
-@@ -102,7 +102,7 @@ public void testSetsThePositionOfTheCurrentWindow() {
+@@ -107,7 +107,7 @@ public void testSetsThePositionOfTheCurrentWindow() {
// off-screen. Therefore, try to stay on-screen. Hopefully you have more than 210 px,
// or this may fail.
window.setSize(new Dimension(200, 200));
@@ -75,65 +75,65 @@
window.setPosition(targetPosition);
wait.until($ -> window.getPosition().x == targetPosition.x);
-@@ -119,7 +119,7 @@ public void testCanMaximizeTheWindow() {
+@@ -125,7 +125,7 @@ public void testCanMaximizeTheWindow() {
// though others aren't defined in org.openqa.selenium.Platform).
assumeFalse(TestUtilities.getEffectivePlatform(driver).is(ANDROID));
-- changeSizeTo(new Dimension(640, 273));
+- changeSizeTo(new Dimension(640, 323));
+ changeSizeTo(new Dimension(640, 398));
enlargeBy(WebDriver.Window::maximize);
}
-@@ -132,7 +132,7 @@ public void testCanMaximizeTheWindowFromFrame() {
+@@ -139,7 +139,7 @@ public void testCanMaximizeTheWindowFromFrame() {
assumeFalse(TestUtilities.getEffectivePlatform(driver).is(ANDROID));
driver.get(pages.framesetPage);
-- changeSizeTo(new Dimension(640, 274));
+- changeSizeTo(new Dimension(640, 324));
+ changeSizeTo(new Dimension(640, 399));
driver.switchTo().frame("fourth");
enlargeBy(WebDriver.Window::maximize);
-@@ -147,7 +147,7 @@ public void testCanMaximizeTheWindowFromIframe() {
+@@ -155,7 +155,7 @@ public void testCanMaximizeTheWindowFromIframe() {
assumeFalse(TestUtilities.getEffectivePlatform(driver).is(ANDROID));
driver.get(pages.iframePage);
-- changeSizeTo(new Dimension(640, 275));
+- changeSizeTo(new Dimension(640, 325));
+ changeSizeTo(new Dimension(640, 400));
driver.switchTo().frame("iframe1-name");
enlargeBy(WebDriver.Window::maximize);
-@@ -161,7 +161,7 @@ public void canFullscreenTheWindow() {
+@@ -170,7 +170,7 @@ public void canFullscreenTheWindow() {
// though others aren't defined in org.openqa.selenium.Platform).
assumeFalse(TestUtilities.getEffectivePlatform(driver).is(ANDROID));
-- changeSizeTo(new Dimension(640, 273));
+- changeSizeTo(new Dimension(640, 323));
+ changeSizeTo(new Dimension(640, 398));
enlargeBy(WebDriver.Window::fullscreen);
}
-@@ -175,7 +175,7 @@ public void canFullscreenTheWindowFromFrame() {
+@@ -185,7 +185,7 @@ public void canFullscreenTheWindowFromFrame() {
assumeFalse(TestUtilities.getEffectivePlatform(driver).is(ANDROID));
driver.get(pages.framesetPage);
-- changeSizeTo(new Dimension(640, 274));
+- changeSizeTo(new Dimension(640, 324));
+ changeSizeTo(new Dimension(640, 399));
driver.switchTo().frame("fourth");
enlargeBy(WebDriver.Window::fullscreen);
-@@ -191,7 +191,7 @@ public void canFullscreenTheWindowFromIframe() {
+@@ -202,7 +202,7 @@ public void canFullscreenTheWindowFromIframe() {
assumeFalse(TestUtilities.getEffectivePlatform(driver).is(ANDROID));
driver.get(pages.iframePage);
-- changeSizeTo(new Dimension(640, 275));
+- changeSizeTo(new Dimension(640, 325));
+ changeSizeTo(new Dimension(640, 400));
driver.switchTo().frame("iframe1-name");
enlargeBy(WebDriver.Window::fullscreen);
diff --git a/java/client/test/org/openqa/selenium/chrome/ChromeOptionsFunctionalTest.java b/java/client/test/org/openqa/selenium/chrome/ChromeOptionsFunctionalTest.java
-index 934e5723c1..6b23bf7e44 100644
+index 232718f92b..3df6752a3a 100644
--- a/java/client/test/org/openqa/selenium/chrome/ChromeOptionsFunctionalTest.java
+++ b/java/client/test/org/openqa/selenium/chrome/ChromeOptionsFunctionalTest.java
-@@ -56,6 +56,7 @@ public void tearDown() {
+@@ -52,6 +52,7 @@ public void tearDown() {
public void canStartChromeWithCustomOptions() {
ChromeOptions options = new ChromeOptions();
options.addArguments("user-agent=foo;bar");
@@ -141,7 +141,7 @@
driver = new ChromeDriver(options);
driver.get(pages.clickJacker);
-@@ -78,6 +79,7 @@ public void optionsStayEqualAfterSerialization() {
+@@ -74,6 +75,7 @@ public void optionsStayEqualAfterSerialization() {
public void canSetAcceptInsecureCerts() {
ChromeOptions options = new ChromeOptions();
options.setAcceptInsecureCerts(true);
@@ -149,7 +149,7 @@
driver = new ChromeDriver(options);
assertThat(driver.getCapabilities().getCapability(ACCEPT_SSL_CERTS)).isEqualTo(true);
-@@ -88,6 +90,7 @@ public void canSetAcceptInsecureCerts() {
+@@ -84,6 +86,7 @@ public void canSetAcceptInsecureCerts() {
public void canAddExtensionFromFile() {
ChromeOptions options = new ChromeOptions();
options.addExtensions(InProject.locate(EXT_PATH).toFile());
@@ -157,15 +157,15 @@
driver = new ChromeDriver(options);
driver.get(pages.clicksPage);
-@@ -105,6 +108,7 @@ public void canAddExtensionFromStringEncodedInBase64() throws IOException {
+@@ -101,6 +104,7 @@ public void canAddExtensionFromStringEncodedInBase64() throws IOException {
ChromeOptions options = new ChromeOptions();
options.addEncodedExtensions(Base64.getEncoder().encodeToString(
- Files.toByteArray(InProject.locate(EXT_PATH).toFile())));
+ Files.readAllBytes(InProject.locate(EXT_PATH))));
+ setWebDriverChromeBinary(options);
driver = new ChromeDriver(options);
driver.get(pages.clicksPage);
-@@ -116,4 +120,10 @@ public void canAddExtensionFromStringEncodedInBase64() throws IOException {
+@@ -112,4 +116,10 @@ public void canAddExtensionFromStringEncodedInBase64() throws IOException {
new WebDriverWait(driver, 10).until(titleIs("clicks"));
}
@@ -177,13 +177,13 @@
+ }
}
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 0067bee3ed..074b33e3bf 100644
+index f9277d1bb4..7ccd02c9e7 100644
--- a/java/client/test/org/openqa/selenium/environment/webserver/JettyAppServer.java
+++ b/java/client/test/org/openqa/selenium/environment/webserver/JettyAppServer.java
-@@ -112,10 +112,6 @@ public JettyAppServer(String hostName, int httpPort, int httpsPort) {
-
+@@ -113,10 +113,6 @@ public JettyAppServer(String hostName, int httpPort, int httpsPort) {
+ Path webSrc = locate("common/src/web");
ServletContextHandler defaultContext = addResourceHandler(
- DEFAULT_CONTEXT_PATH, locate("common/src/web"));
+ DEFAULT_CONTEXT_PATH, webSrc);
- ServletContextHandler jsContext = addResourceHandler(
- JS_SRC_CONTEXT_PATH, locate("javascript"));
- addResourceHandler(CLOSURE_CONTEXT_PATH, locate("third_party/closure/goog"));
@@ -192,19 +192,19 @@
TemporaryFilesystem tempFs = TemporaryFilesystem.getDefaultTmpFS();
tempPageDir = tempFs.createTempDir("pages", "test");
diff --git a/java/client/test/org/openqa/selenium/testing/JUnit4TestBase.java b/java/client/test/org/openqa/selenium/testing/JUnit4TestBase.java
-index c3f5e39c38..e54136b838 100644
+index 1cd5ef93ab..49b3a64b69 100644
--- a/java/client/test/org/openqa/selenium/testing/JUnit4TestBase.java
+++ b/java/client/test/org/openqa/selenium/testing/JUnit4TestBase.java
-@@ -31,6 +31,7 @@
+@@ -30,6 +30,7 @@
+ import org.junit.runners.model.Statement;
import org.openqa.selenium.Capabilities;
- import org.openqa.selenium.Pages;
import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.environment.GlobalTestEnvironment;
import org.openqa.selenium.environment.InProcessTestEnvironment;
import org.openqa.selenium.environment.TestEnvironment;
@@ -163,10 +164,25 @@ private boolean notImplemented(Stream<NotYetImplemented> nyi) {
- return nyi.anyMatch(driver -> matches(browser, new Driver[]{driver.value()}));
+ return nyi.anyMatch(driver -> matches(current, new Browser[]{driver.value()}));
}
+ private boolean isReadyToRun(Description description) {
@@ -295,8 +295,68 @@
if (driver == null ||
(driver instanceof RemoteWebDriver && ((RemoteWebDriver)driver).getSessionId() == null)) {
+diff --git a/java/client/test/org/openqa/selenium/testing/TestIgnorance.java b/java/client/test/org/openqa/selenium/testing/TestIgnorance.java
+index 0912d363a6..3465bfbe50 100644
+--- a/java/client/test/org/openqa/selenium/testing/TestIgnorance.java
++++ b/java/client/test/org/openqa/selenium/testing/TestIgnorance.java
+@@ -63,20 +63,44 @@ public TestIgnorance(Browser driver) {
+ }
+
+ public boolean isIgnored(Description method) {
+- boolean ignored = ignoreComparator.shouldIgnore(method.getTestClass().getAnnotation(IgnoreList.class)) ||
+- ignoreComparator.shouldIgnore(method.getTestClass().getAnnotation(Ignore.class)) ||
+- ignoreComparator.shouldIgnore(method.getAnnotation(IgnoreList.class)) ||
+- ignoreComparator.shouldIgnore(method.getAnnotation(Ignore.class));
+-
+- ignored |= isIgnoredBecauseOfJUnit4Ignore(method.getTestClass().getAnnotation(org.junit.Ignore.class));
+- ignored |= isIgnoredBecauseOfJUnit4Ignore(method.getAnnotation(org.junit.Ignore.class));
+- if (Boolean.getBoolean("ignored_only")) {
+- ignored = !ignored;
++
++ String name = method.getTestClass().getSimpleName() + "." + method.getMethodName();
++ String filter = System.getProperty("filter", ".*");
++ String[] patternGroups = filter.split("-");
++ String[] positivePatterns = patternGroups[0].split(":");
++ String[] negativePatterns = new String[0];
++
++ if (patternGroups.length > 1) {
++ negativePatterns = patternGroups[1].split(":");
++
++ for (int i = 0; i < negativePatterns.length; i++) {
++ if (name.matches(negativePatterns[i])) {
++ return true;
++ }
++ }
+ }
+
+- ignored |= isIgnoredDueToEnvironmentVariables(method);
++ for (int i = 0; i < positivePatterns.length; i++) {
++ if (name.matches(positivePatterns[i])) {
++
++ boolean ignored = ignoreComparator.shouldIgnore(method.getTestClass().getAnnotation(IgnoreList.class)) ||
++ ignoreComparator.shouldIgnore(method.getTestClass().getAnnotation(Ignore.class)) ||
++ ignoreComparator.shouldIgnore(method.getAnnotation(IgnoreList.class)) ||
++ ignoreComparator.shouldIgnore(method.getAnnotation(Ignore.class));
+
+- return ignored;
++ ignored |= isIgnoredBecauseOfJUnit4Ignore(method.getTestClass().getAnnotation(org.junit.Ignore.class));
++ ignored |= isIgnoredBecauseOfJUnit4Ignore(method.getAnnotation(org.junit.Ignore.class));
++
++ if (Boolean.getBoolean("ignored_only")) {
++ ignored = !ignored;
++ }
++
++ ignored |= isIgnoredDueToEnvironmentVariables(method);
++
++ return ignored;
++ }
++ }
++ return true;
+ }
+
+ 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 24febe5e42..d0bcbdde20 100644
+index 6177c2a4bc..8b10ff727f 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) {
@@ -358,68 +418,8 @@
if (originalCapabilities != null) {
options.merge(originalCapabilities);
}
-diff --git a/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java b/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java
-index 72b97bdee4..e08b5c9e64 100644
---- a/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java
-+++ b/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java
-@@ -82,20 +82,44 @@ public TestIgnorance(Browser browser) {
- }
-
- public boolean isIgnored(Description method) {
-- boolean ignored = ignoreComparator.shouldIgnore(method.getTestClass().getAnnotation(IgnoreList.class)) ||
-- ignoreComparator.shouldIgnore(method.getTestClass().getAnnotation(Ignore.class)) ||
-- ignoreComparator.shouldIgnore(method.getAnnotation(IgnoreList.class)) ||
-- ignoreComparator.shouldIgnore(method.getAnnotation(Ignore.class));
--
-- ignored |= isIgnoredBecauseOfJUnit4Ignore(method.getTestClass().getAnnotation(org.junit.Ignore.class));
-- ignored |= isIgnoredBecauseOfJUnit4Ignore(method.getAnnotation(org.junit.Ignore.class));
-- if (Boolean.getBoolean("ignored_only")) {
-- ignored = !ignored;
-+
-+ String name = method.getTestClass().getSimpleName() + "." + method.getMethodName();
-+ String filter = System.getProperty("filter", ".*");
-+ String[] patternGroups = filter.split("-");
-+ String[] positivePatterns = patternGroups[0].split(":");
-+ String[] negativePatterns = new String[0];
-+
-+ if (patternGroups.length > 1) {
-+ negativePatterns = patternGroups[1].split(":");
-+
-+ for (int i = 0; i < negativePatterns.length; i++) {
-+ if (name.matches(negativePatterns[i])) {
-+ return true;
-+ }
-+ }
- }
-
-- ignored |= isIgnoredDueToEnvironmentVariables(method);
-+ for (int i = 0; i < positivePatterns.length; i++) {
-+ if (name.matches(positivePatterns[i])) {
-+
-+ boolean ignored = ignoreComparator.shouldIgnore(method.getTestClass().getAnnotation(IgnoreList.class)) ||
-+ ignoreComparator.shouldIgnore(method.getTestClass().getAnnotation(Ignore.class)) ||
-+ ignoreComparator.shouldIgnore(method.getAnnotation(IgnoreList.class)) ||
-+ ignoreComparator.shouldIgnore(method.getAnnotation(Ignore.class));
-
-- return ignored;
-+ ignored |= isIgnoredBecauseOfJUnit4Ignore(method.getTestClass().getAnnotation(org.junit.Ignore.class));
-+ ignored |= isIgnoredBecauseOfJUnit4Ignore(method.getAnnotation(org.junit.Ignore.class));
-+
-+ if (Boolean.getBoolean("ignored_only")) {
-+ ignored = !ignored;
-+ }
-+
-+ ignored |= isIgnoredDueToEnvironmentVariables(method);
-+
-+ return ignored;
-+ }
-+ }
-+ return true;
- }
-
- private boolean isIgnoredBecauseOfJUnit4Ignore(org.junit.Ignore annotation) {
diff --git a/java/client/test/org/openqa/selenium/testing/drivers/WebDriverBuilder.java b/java/client/test/org/openqa/selenium/testing/drivers/WebDriverBuilder.java
-index ab6ea68623..319fb964cd 100644
+index 0a19551a9a..bbf82e7a38 100644
--- a/java/client/test/org/openqa/selenium/testing/drivers/WebDriverBuilder.java
+++ b/java/client/test/org/openqa/selenium/testing/drivers/WebDriverBuilder.java
@@ -47,8 +47,12 @@