Skip to content

Commit 6620f9b

Browse files
Merge branch 'trunk' into dotnet-modern-nunit
2 parents 91be58a + 313f7a5 commit 6620f9b

File tree

10 files changed

+82
-91
lines changed

10 files changed

+82
-91
lines changed

common/repositories.bzl

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ def pin_browsers():
1111

1212
http_archive(
1313
name = "linux_firefox",
14-
url = "https://ftp.mozilla.org/pub/firefox/releases/132.0.2/linux-x86_64/en-US/firefox-132.0.2.tar.bz2",
15-
sha256 = "777d47f8b8710ab450582dc0dc0cdf8f43c2291249b3eaf740ee28ee34cda139",
14+
url = "https://ftp.mozilla.org/pub/firefox/releases/133.0/linux-x86_64/en-US/firefox-133.0.tar.bz2",
15+
sha256 = "63cb097174d429043ad128341358d14cdb5d4c9d05d035d9e3094634ceaf22c2",
1616
build_file_content = """
1717
load("@aspect_rules_js//js:defs.bzl", "js_library")
1818
package(default_visibility = ["//visibility:public"])
@@ -33,8 +33,8 @@ js_library(
3333

3434
dmg_archive(
3535
name = "mac_firefox",
36-
url = "https://ftp.mozilla.org/pub/firefox/releases/132.0.2/mac/en-US/Firefox%20132.0.2.dmg",
37-
sha256 = "233251c46eb4964868d815a9233cab855ac6160736310771a67af93a9b78224d",
36+
url = "https://ftp.mozilla.org/pub/firefox/releases/133.0/mac/en-US/Firefox%20133.0.dmg",
37+
sha256 = "02c76e21d64f21d4e45b1205717ccd0736a75f2a50b01c74b25b17e374447a76",
3838
build_file_content = """
3939
load("@aspect_rules_js//js:defs.bzl", "js_library")
4040
package(default_visibility = ["//visibility:public"])
@@ -50,8 +50,8 @@ js_library(
5050

5151
http_archive(
5252
name = "linux_beta_firefox",
53-
url = "https://ftp.mozilla.org/pub/firefox/releases/133.0b9/linux-x86_64/en-US/firefox-133.0b9.tar.bz2",
54-
sha256 = "5c9f79912bfbf892d2b676973a26ffc078ee9b8fd9b791bfa856db030e657750",
53+
url = "https://ftp.mozilla.org/pub/firefox/releases/134.0b5/linux-x86_64/en-US/firefox-134.0b5.tar.bz2",
54+
sha256 = "9688f50d2bba71c7781e7f46100e97223d469d37197cf99511a2b2e27efd50a2",
5555
build_file_content = """
5656
load("@aspect_rules_js//js:defs.bzl", "js_library")
5757
package(default_visibility = ["//visibility:public"])
@@ -72,8 +72,8 @@ js_library(
7272

7373
dmg_archive(
7474
name = "mac_beta_firefox",
75-
url = "https://ftp.mozilla.org/pub/firefox/releases/133.0b9/mac/en-US/Firefox%20133.0b9.dmg",
76-
sha256 = "0eb0fabe9216dc80c2ca403dd2eba935d71f2bdc1dea1d1cc37f03666ef094d1",
75+
url = "https://ftp.mozilla.org/pub/firefox/releases/134.0b5/mac/en-US/Firefox%20134.0b5.dmg",
76+
sha256 = "5c6d02d149637e963c55c741ebed98a8dacfa93c90e99065981bbdd9d511a0f1",
7777
build_file_content = """
7878
load("@aspect_rules_js//js:defs.bzl", "js_library")
7979
package(default_visibility = ["//visibility:public"])
@@ -123,10 +123,10 @@ js_library(
123123

124124
pkg_archive(
125125
name = "mac_edge",
126-
url = "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/08b226c9-fbe8-43c0-94fe-ed9c3eeb8f59/MicrosoftEdge-131.0.2903.51.pkg",
127-
sha256 = "5bc1eab86bb315aa9f2cd2b7d9afe072df35280f6e6d1a9ca9c108d95bda8acd",
126+
url = "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/a310bc51-4dc2-4780-9677-41f3ecf37e31/MicrosoftEdge-131.0.2903.86.pkg",
127+
sha256 = "77dc0bf6d465815d3414a1b52d506323619c9debb12f9feb85ec4ad2c7e58585",
128128
move = {
129-
"MicrosoftEdge-131.0.2903.51.pkg/Payload/Microsoft Edge.app": "Edge.app",
129+
"MicrosoftEdge-131.0.2903.86.pkg/Payload/Microsoft Edge.app": "Edge.app",
130130
},
131131
build_file_content = """
132132
load("@aspect_rules_js//js:defs.bzl", "js_library")
@@ -143,8 +143,8 @@ js_library(
143143

144144
deb_archive(
145145
name = "linux_edge",
146-
url = "https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_131.0.2903.51-1_amd64.deb",
147-
sha256 = "8aad12c97bcae417ff9cc4251b75211eeda7f1513312dc57b2f744e824e028c0",
146+
url = "https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_131.0.2903.86-1_amd64.deb",
147+
sha256 = "4c7844e51ffefbf5a595f3d93e633481c6081f0fd954d15cc08066ea23ddacf3",
148148
build_file_content = """
149149
load("@aspect_rules_js//js:defs.bzl", "js_library")
150150
package(default_visibility = ["//visibility:public"])
@@ -165,8 +165,8 @@ js_library(
165165

166166
http_archive(
167167
name = "linux_edgedriver",
168-
url = "https://msedgedriver.azureedge.net/131.0.2903.52/edgedriver_linux64.zip",
169-
sha256 = "ddbeda7cec5ed16b96c3cf0f6759de30e4f3726da9da31bfba1371ccd8fcfd14",
168+
url = "https://msedgedriver.azureedge.net/131.0.2903.84/edgedriver_linux64.zip",
169+
sha256 = "13b8024056a2ae72dfc45907213212756ffaf52567fa2b367acadd20badfb4bb",
170170
build_file_content = """
171171
load("@aspect_rules_js//js:defs.bzl", "js_library")
172172
package(default_visibility = ["//visibility:public"])
@@ -182,8 +182,8 @@ js_library(
182182

183183
http_archive(
184184
name = "mac_edgedriver",
185-
url = "https://msedgedriver.azureedge.net/131.0.2903.56/edgedriver_mac64.zip",
186-
sha256 = "4f4d1d5b45849677f8d8e706f7b5ca9ebb99f40ed3b4ee203c2535a3429e0d5b",
185+
url = "https://msedgedriver.azureedge.net/131.0.2903.84/edgedriver_mac64.zip",
186+
sha256 = "288c7b38d24a0650ca60e9e2a231c0c71976adc37be9e11e777e0596c40b3878",
187187
build_file_content = """
188188
load("@aspect_rules_js//js:defs.bzl", "js_library")
189189
package(default_visibility = ["//visibility:public"])
@@ -199,8 +199,8 @@ js_library(
199199

200200
http_archive(
201201
name = "linux_chrome",
202-
url = "https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.85/linux64/chrome-linux64.zip",
203-
sha256 = "3a6d928b0002ec012a53b6bb65dcaf95add008adc223c961d566d824982a767e",
202+
url = "https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.87/linux64/chrome-linux64.zip",
203+
sha256 = "5ed0d25537b964cdf826224165a80d125ae67bbb980065c2f1e665dae6686904",
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/131.0.6778.85/mac-x64/chrome-mac-x64.zip",
225-
sha256 = "e26a606e2a3da403c6e1e93617a7b51ee010706614eb88de5b16470276e0896b",
224+
url = "https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.87/mac-x64/chrome-mac-x64.zip",
225+
sha256 = "a9ab895b3ab102973f224f35bef6f0336b690f03cc5fbb73110bf448fe30ce70",
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/131.0.6778.85/linux64/chromedriver-linux64.zip",
247-
sha256 = "33910b16568feabd2b50a26a2c4456d154c760d6e28347427f99c025661a4f3e",
246+
url = "https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.87/linux64/chromedriver-linux64.zip",
247+
sha256 = "bb0c5ee6594453258b328b838adc194ed0df000f2a6e5ead306b637a995e387b",
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/131.0.6778.85/mac-x64/chromedriver-mac-x64.zip",
265-
sha256 = "ee194eba1d52dea61dfbf08b05a2ce139660e9c7d20d15024c3a0757ac4a5fcb",
264+
url = "https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.87/mac-x64/chromedriver-mac-x64.zip",
265+
sha256 = "9fa91a7b7e969cbd6edb089e14b8db2189353519640dcc84c067369918bfb04f",
266266
strip_prefix = "chromedriver-mac-x64",
267267
build_file_content = """
268268
load("@aspect_rules_js//js:defs.bzl", "js_library")

java/src/org/openqa/selenium/chromium/ChromiumDriver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ protected ChromiumDriver(
147147

148148
try {
149149
try {
150-
cdpUri = client.flatMap(httpClient -> CdpEndpointFinder.getCdpEndPoint(httpClient));
150+
cdpUri = client.flatMap(CdpEndpointFinder::getCdpEndPoint);
151151
} catch (Exception e) {
152152
try {
153153
client.ifPresent(HttpClient::close);

java/src/org/openqa/selenium/devtools/SeleniumCdpConnection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public static Optional<Connection> create(
7777
client = reportedUri.map(uri -> CdpEndpointFinder.getHttpClient(clientFactory, uri));
7878

7979
try {
80-
cdpUri = client.flatMap(httpClient -> CdpEndpointFinder.getCdpEndPoint(httpClient));
80+
cdpUri = client.flatMap(CdpEndpointFinder::getCdpEndPoint);
8181
} catch (Exception e) {
8282
try {
8383
client.ifPresent(HttpClient::close);
@@ -87,7 +87,7 @@ public static Optional<Connection> create(
8787
throw e;
8888
}
8989

90-
if (!cdpUri.isPresent()) {
90+
if (cdpUri.isEmpty()) {
9191
try {
9292
client.ifPresent(HttpClient::close);
9393
} catch (Exception e) {

java/src/org/openqa/selenium/firefox/FirefoxDriver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ private FirefoxDriver(
176176
Optional<URI> cdpUri;
177177

178178
try {
179-
cdpUri = client.flatMap(httpClient -> CdpEndpointFinder.getCdpEndPoint(httpClient));
179+
cdpUri = client.flatMap(CdpEndpointFinder::getCdpEndPoint);
180180
} catch (Exception e) {
181181
try {
182182
client.ifPresent(HttpClient::close);

java/src/org/openqa/selenium/remote/RemoteWebDriver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,7 @@ public void addCredential(Credential credential) {
12471247
Stream.concat(
12481248
credential.toMap().entrySet().stream(),
12491249
Stream.of(Map.entry("authenticatorId", id)))
1250-
.collect(Collectors.toUnmodifiableMap((e) -> e.getKey(), (e) -> e.getValue())));
1250+
.collect(Collectors.toUnmodifiableMap(Map.Entry::getKey, Map.Entry::getValue)));
12511251
}
12521252

12531253
@Override

java/test/org/openqa/selenium/NoSuchShadowRootTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ public void getNoSuchShadowRoot() {
3434
driver.get(pages.shadowRootPage);
3535
WebElement nonExistentShadowRootElement = driver.findElement(By.id("noShadowRoot"));
3636
assertThatExceptionOfType(NoSuchShadowRootException.class)
37-
.isThrownBy(() -> nonExistentShadowRootElement.getShadowRoot());
37+
.isThrownBy(nonExistentShadowRootElement::getShadowRoot);
3838
}
3939
}

java/test/org/openqa/selenium/grid/node/relay/RelayOptionsTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,7 @@ void protocolVersionThrowsConfigException() {
137137
Config config = new TomlConfig(new StringReader(String.join("\n", rawConfig)));
138138
RelayOptions relayOptions = new RelayOptions(config);
139139
assertThatExceptionOfType(ConfigException.class)
140-
.isThrownBy(
141-
() -> {
142-
relayOptions.getServiceProtocolVersion();
143-
})
140+
.isThrownBy(relayOptions::getServiceProtocolVersion)
144141
.withMessageContaining("Unsupported protocol version provided: HTTP/0.9");
145142
}
146143

java/test/org/openqa/selenium/grid/server/BaseServerOptionsTest.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,7 @@ void externalUriFailsForNonUriStrings() {
5252
BaseServerOptions options =
5353
new BaseServerOptions(new MapConfig(Map.of("server", Map.of("external-url", "not a URL"))));
5454

55-
Exception exception =
56-
assertThrows(
57-
RuntimeException.class,
58-
() -> {
59-
options.getExternalUri();
60-
});
55+
Exception exception = assertThrows(RuntimeException.class, options::getExternalUri);
6156

6257
assertThat(exception.getMessage())
6358
.as("External URI must be parseable as URI.")

py/selenium/webdriver/common/fedcm/account.py

Lines changed: 21 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -24,48 +24,33 @@ class LoginState(Enum):
2424
SIGN_UP = "SignUp"
2525

2626

27+
class _AccountDescriptor:
28+
def __init__(self, name):
29+
self.name = name
30+
31+
def __get__(self, obj, cls) -> Optional[str]:
32+
return obj._account_data.get(self.name)
33+
34+
def __set__(self, obj, value) -> None:
35+
raise AttributeError("Cannot set readonly attribute")
36+
37+
2738
class Account:
2839
"""Represents an account displayed in a FedCM account list.
2940
3041
See: https://w3c-fedid.github.io/FedCM/#dictdef-identityprovideraccount
3142
https://w3c-fedid.github.io/FedCM/#webdriver-accountlist
3243
"""
3344

45+
account_id = _AccountDescriptor("accountId")
46+
email = _AccountDescriptor("email")
47+
name = _AccountDescriptor("name")
48+
given_name = _AccountDescriptor("givenName")
49+
picture_url = _AccountDescriptor("pictureUrl")
50+
idp_config_url = _AccountDescriptor("idpConfigUrl")
51+
terms_of_service_url = _AccountDescriptor("termsOfServiceUrl")
52+
privacy_policy_url = _AccountDescriptor("privacyPolicyUrl")
53+
login_state = _AccountDescriptor("loginState")
54+
3455
def __init__(self, account_data):
3556
self._account_data = account_data
36-
37-
@property
38-
def account_id(self) -> Optional[str]:
39-
return self._account_data.get("accountId")
40-
41-
@property
42-
def email(self) -> Optional[str]:
43-
return self._account_data.get("email")
44-
45-
@property
46-
def name(self) -> Optional[str]:
47-
return self._account_data.get("name")
48-
49-
@property
50-
def given_name(self) -> Optional[str]:
51-
return self._account_data.get("givenName")
52-
53-
@property
54-
def picture_url(self) -> Optional[str]:
55-
return self._account_data.get("pictureUrl")
56-
57-
@property
58-
def idp_config_url(self) -> Optional[str]:
59-
return self._account_data.get("idpConfigUrl")
60-
61-
@property
62-
def terms_of_service_url(self) -> Optional[str]:
63-
return self._account_data.get("termsOfServiceUrl")
64-
65-
@property
66-
def privacy_policy_url(self) -> Optional[str]:
67-
return self._account_data.get("privacyPolicyUrl")
68-
69-
@property
70-
def login_state(self) -> Optional[str]:
71-
return self._account_data.get("loginState")

scripts/pinned_browsers.py

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,24 @@ def chrome(selected_version):
175175
return content
176176

177177

178+
def convert_keys_to_lowercase(obj):
179+
if isinstance(obj, dict):
180+
return {k.lower(): convert_keys_to_lowercase(v) for k, v in obj.items()}
181+
elif isinstance(obj, list):
182+
return [convert_keys_to_lowercase(i) for i in obj]
183+
else:
184+
return obj
185+
186+
187+
def case_insensitive_json_loads(json_str):
188+
data = json.loads(json_str)
189+
return convert_keys_to_lowercase(data)
190+
191+
178192
def edge():
179193
content = ""
180194
r = http.request("GET", "https://edgeupdates.microsoft.com/api/products")
181-
all_data = json.loads(r.data)
195+
all_data = case_insensitive_json_loads(r.data)
182196

183197
linux = None
184198
linux_hash = None
@@ -187,20 +201,20 @@ def edge():
187201
version = None
188202

189203
for data in all_data:
190-
if not "Stable" == data.get("Product"):
204+
if not "Stable" == data.get("product"):
191205
continue
192-
for release in data["Releases"]:
193-
if "MacOS" == release.get("Platform"):
194-
for artifact in release["Artifacts"]:
195-
if "pkg" == artifact["ArtifactName"]:
196-
mac = artifact["Location"]
197-
mac_hash = artifact["Hash"]
198-
mac_version = release["ProductVersion"]
199-
elif "Linux" == release.get("Platform"):
200-
for artifact in release["Artifacts"]:
201-
if "deb" == artifact["ArtifactName"]:
202-
linux = artifact["Location"]
203-
linux_hash = artifact["Hash"]
206+
for release in data["releases"]:
207+
if "MacOS" == release.get("platform"):
208+
for artifact in release["artifacts"]:
209+
if "pkg" == artifact["artifactname"]:
210+
mac = artifact["location"]
211+
mac_hash = artifact["hash"]
212+
mac_version = release["productversion"]
213+
elif "Linux" == release.get("platform"):
214+
for artifact in release["artifacts"]:
215+
if "deb" == artifact["artifactname"]:
216+
linux = artifact["location"]
217+
linux_hash = artifact["hash"]
204218

205219
if mac and mac_hash:
206220
content += """

0 commit comments

Comments
 (0)