Skip to content

Commit f5a9f85

Browse files
authored
Merge branch 'trunk' into py-bidi-browsing_context
2 parents 5d09b9e + f7aa586 commit f5a9f85

File tree

12 files changed

+33
-30
lines changed

12 files changed

+33
-30
lines changed

common/repositories.bzl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ js_library(
199199

200200
http_archive(
201201
name = "linux_chrome",
202-
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.95/linux64/chrome-linux64.zip",
203-
sha256 = "bf406b6de491825f7db9d4b635b9ba56a8e8b6e60fac130382f561bb62f12d7e",
202+
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.97/linux64/chrome-linux64.zip",
203+
sha256 = "dca0a86931162c85fbd054cc037519fcf855dca912c7fd2dc2e2e48fb7d59961",
204204
build_file_content = """
205205
load("@aspect_rules_js//js:defs.bzl", "js_library")
206206
package(default_visibility = ["//visibility:public"])
@@ -221,8 +221,8 @@ js_library(
221221

222222
http_archive(
223223
name = "mac_chrome",
224-
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.95/mac-x64/chrome-mac-x64.zip",
225-
sha256 = "949f46e9fd58b96a3c5fc436dde9b4aa04e683258a83867d6f0ec8abb58537ec",
224+
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.97/mac-x64/chrome-mac-x64.zip",
225+
sha256 = "53880ac98a04490c647d1a5649eb0ebd8001741bb17501df34908e8826fe516f",
226226
strip_prefix = "chrome-mac-x64",
227227
patch_cmds = [
228228
"mv 'Google Chrome for Testing.app' Chrome.app",
@@ -243,8 +243,8 @@ js_library(
243243

244244
http_archive(
245245
name = "linux_chromedriver",
246-
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.95/linux64/chromedriver-linux64.zip",
247-
sha256 = "64e1f8bf5bbb94983dff82874b79f45039e5463323e8912d38b83a1277f9e272",
246+
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.97/linux64/chromedriver-linux64.zip",
247+
sha256 = "12a0e6e8035b3671a7a884e33949f1f5154d2d2ca68593715851f6f3a5e836ec",
248248
strip_prefix = "chromedriver-linux64",
249249
build_file_content = """
250250
load("@aspect_rules_js//js:defs.bzl", "js_library")
@@ -261,8 +261,8 @@ js_library(
261261

262262
http_archive(
263263
name = "mac_chromedriver",
264-
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.95/mac-x64/chromedriver-mac-x64.zip",
265-
sha256 = "9bf330af1a080d6bbda6dc80cf064de371941e65b826cfc5a589628d1c78aef9",
264+
url = "https://storage.googleapis.com/chrome-for-testing-public/135.0.7049.97/mac-x64/chromedriver-mac-x64.zip",
265+
sha256 = "2eedf6406ca4e9f11a4c196ce56e8d25c15dc68bd8ea07c7da8423d2327e9aa1",
266266
strip_prefix = "chromedriver-mac-x64",
267267
build_file_content = """
268268
load("@aspect_rules_js//js:defs.bzl", "js_library")

dotnet/src/webdriver/Firefox/FirefoxOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ public FirefoxOptions()
8383
this.AddKnownCapabilityName(FirefoxOptions.FirefoxLegacyProfileCapability, "Profile property");
8484
this.AddKnownCapabilityName(FirefoxOptions.FirefoxLegacyBinaryCapability, "BrowserExecutableLocation property");
8585
this.AddKnownCapabilityName(FirefoxOptions.FirefoxEnableDevToolsProtocolCapability, "EnableDevToolsProtocol property");
86-
// Firefox 129 onwards the CDP protocol will not be enabled by default. Setting this preference will enable it.
8786
// https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/.
88-
this.SetPreference("remote.active-protocols", 3);
87+
// Enable BiDi only
88+
this.SetPreference("remote.active-protocols", 1);
8989
}
9090

9191
/// <summary>

java/src/org/openqa/selenium/remote/http/jdk/JdkHttpClient.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,13 @@ public WebSocket openSocket(HttpRequest request, WebSocket.Listener listener) {
166166
throw new ConnectionFailedException("JdkWebSocket initial request execution error", e);
167167
}
168168

169+
java.net.http.WebSocket.Builder builder = client.newWebSocketBuilder();
170+
171+
request.getHeaderNames().forEach(name -> builder.header(name, request.getHeader(name)));
172+
169173
CompletableFuture<Integer> closed = new CompletableFuture<>();
170174
CompletableFuture<java.net.http.WebSocket> webSocketCompletableFuture =
171-
client
172-
.newWebSocketBuilder()
175+
builder
173176
.connectTimeout(connectTimeout)
174177
.buildAsync(
175178
uri,

javascript/selenium-webdriver/firefox.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ class Options extends Capabilities {
247247
constructor(other) {
248248
super(other)
249249
this.setBrowserName(Browser.FIREFOX)
250-
// Firefox 129 onwards the CDP protocol will not be enabled by default. Setting this preference will enable it.
251250
// https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/.
252-
this.setPreference('remote.active-protocols', 3)
251+
// Enable BiDi only
252+
this.setPreference('remote.active-protocols', 1)
253253
}
254254

255255
/**

javascript/selenium-webdriver/test/firefox/options_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ suite(
9090
assert.deepStrictEqual(
9191
{
9292
androidPackage: 'org.mozilla.firefox',
93-
prefs: { 'remote.active-protocols': 3 },
93+
prefs: { 'remote.active-protocols': 1 },
9494
},
9595
firefoxOptions,
9696
)

py/selenium/webdriver/firefox/options.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ def __init__(self) -> None:
4444
super().__init__()
4545
self._binary_location = ""
4646
self._preferences: dict = {}
47-
# Firefox 129 onwards the CDP protocol will not be enabled by default. Setting this preference will enable it.
4847
# https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/.
49-
self._preferences["remote.active-protocols"] = 3
48+
# Enable BiDi only
49+
self._preferences["remote.active-protocols"] = 1
5050
self._profile: Optional[FirefoxProfile] = None
5151
self.log = Log()
5252

py/test/selenium/webdriver/marionette/mn_options_tests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class TestUnit:
4242
def test_ctor(self):
4343
opts = Options()
4444
assert opts.binary_location == ""
45-
assert opts._preferences == {"remote.active-protocols": 3}
45+
assert opts._preferences == {"remote.active-protocols": 1}
4646
assert opts._profile is None
4747
assert not opts._arguments
4848
assert isinstance(opts.log, Log)
@@ -72,7 +72,7 @@ def test_prefs(self):
7272
assert len(opts.preferences) == 3
7373
opts.set_preference("spam", "spam")
7474
assert len(opts.preferences) == 3
75-
assert opts.preferences == {"eggs": True, "remote.active-protocols": 3, "spam": "spam"}
75+
assert opts.preferences == {"eggs": True, "remote.active-protocols": 1, "spam": "spam"}
7676

7777
def test_profile(self, tmpdir_factory):
7878
opts = Options()
@@ -102,7 +102,7 @@ def test_to_capabilities(self):
102102
firefox_caps.update(
103103
{
104104
"pageLoadStrategy": PageLoadStrategy.normal,
105-
"moz:firefoxOptions": {"prefs": {"remote.active-protocols": 3}},
105+
"moz:firefoxOptions": {"prefs": {"remote.active-protocols": 1}},
106106
}
107107
)
108108
assert opts.to_capabilities() == firefox_caps

py/test/unit/selenium/webdriver/firefox/firefox_options_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def test_set_proxy_isnt_in_moz_prefix(options):
7979

8080
caps = options.to_capabilities()
8181
assert caps["proxy"]["proxyType"] == "manual"
82-
assert caps.get("moz:firefoxOptions") == {"prefs": {"remote.active-protocols": 3}}
82+
assert caps.get("moz:firefoxOptions") == {"prefs": {"remote.active-protocols": 1}}
8383

8484

8585
def test_raises_exception_if_proxy_is_not_proxy_object(options):

py/test/unit/selenium/webdriver/remote/new_session_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def test_first_match_when_2_different_option_types():
103103
"browserName": "firefox",
104104
"acceptInsecureCerts": True,
105105
"moz:debuggerAddress": True,
106-
"moz:firefoxOptions": {"args": ["foo"], "prefs": {"remote.active-protocols": 3}},
106+
"moz:firefoxOptions": {"args": ["foo"], "prefs": {"remote.active-protocols": 1}},
107107
},
108108
],
109109
}

rb/lib/selenium/webdriver/firefox/options.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ def initialize(log_level: nil, **opts)
6464

6565
@options[:args] ||= []
6666
@options[:prefs] ||= {}
67-
# Firefox 129 onwards the CDP protocol will not be enabled by default. Setting this preference will enable it.
6867
# https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/.
69-
@options[:prefs]['remote.active-protocols'] = 3
68+
# Enable BiDi only
69+
@options[:prefs]['remote.active-protocols'] = 1
7070
@options[:env] ||= {}
7171
@options[:log] ||= {level: log_level} if log_level
7272

0 commit comments

Comments
 (0)