Skip to content

Commit 6181863

Browse files
authored
Merge branch 'trunk' into py-service-args-properties
2 parents 4130f4c + 1fe6d27 commit 6181863

File tree

9 files changed

+186
-60
lines changed

9 files changed

+186
-60
lines changed

MODULE.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,13 +370,17 @@ use_repo(
370370
pin_browsers_extension = use_extension("//common:repositories.bzl", "pin_browsers_extension")
371371
use_repo(
372372
pin_browsers_extension,
373+
"linux_beta_chrome",
374+
"linux_beta_chromedriver",
373375
"linux_beta_firefox",
374376
"linux_chrome",
375377
"linux_chromedriver",
376378
"linux_edge",
377379
"linux_edgedriver",
378380
"linux_firefox",
379381
"linux_geckodriver",
382+
"mac_beta_chrome",
383+
"mac_beta_chromedriver",
380384
"mac_beta_firefox",
381385
"mac_chrome",
382386
"mac_chromedriver",

common/browsers.bzl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,25 @@ firefox_beta_data = select({
8383
],
8484
"//conditions:default": [],
8585
}) + geckodriver_data
86+
87+
chromedriver_beta_data = select({
88+
"@selenium//common:use_pinned_linux_chrome": [
89+
"@linux_beta_chromedriver//:chromedriver",
90+
],
91+
"@selenium//common:use_pinned_macos_chrome": [
92+
"@mac_beta_chromedriver//:chromedriver",
93+
],
94+
"@selenium//common:use_local_chromedriver": ["@selenium//common:chromedriver"],
95+
"//conditions:default": [],
96+
})
97+
98+
chrome_beta_data = select({
99+
"@selenium//common:use_pinned_linux_chrome": [
100+
"@linux_beta_chrome//:files",
101+
"@linux_beta_chrome//:chrome-linux64/chrome",
102+
],
103+
"@selenium//common:use_pinned_macos_chrome": [
104+
"@mac_beta_chrome//:Chrome.app",
105+
],
106+
"//conditions:default": [],
107+
}) + chromedriver_beta_data

common/repositories.bzl

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ js_library(
218218
)
219219
""",
220220
)
221-
222221
http_archive(
223222
name = "mac_chrome",
224223
url = "https://storage.googleapis.com/chrome-for-testing-public/137.0.7151.70/mac-x64/chrome-mac-x64.zip",
@@ -240,7 +239,6 @@ js_library(
240239
)
241240
""",
242241
)
243-
244242
http_archive(
245243
name = "linux_chromedriver",
246244
url = "https://storage.googleapis.com/chrome-for-testing-public/137.0.7151.70/linux64/chromedriver-linux64.zip",
@@ -270,6 +268,84 @@ package(default_visibility = ["//visibility:public"])
270268
271269
exports_files(["chromedriver"])
272270
271+
js_library(
272+
name = "chromedriver-js",
273+
data = ["chromedriver"],
274+
)
275+
""",
276+
)
277+
278+
http_archive(
279+
name = "linux_beta_chrome",
280+
url = "https://storage.googleapis.com/chrome-for-testing-public/138.0.7204.15/linux64/chrome-linux64.zip",
281+
sha256 = "e4bb8769b613eacd7cc40e48f3f63d96de9e9ee642360b4a79bedd502291c544",
282+
build_file_content = """
283+
load("@aspect_rules_js//js:defs.bzl", "js_library")
284+
package(default_visibility = ["//visibility:public"])
285+
286+
filegroup(
287+
name = "files",
288+
srcs = glob(["**/*"]),
289+
)
290+
291+
exports_files(["chrome-linux64/chrome"])
292+
293+
js_library(
294+
name = "chrome-js",
295+
data = [":files"],
296+
)
297+
""",
298+
)
299+
http_archive(
300+
name = "mac_beta_chrome",
301+
url = "https://storage.googleapis.com/chrome-for-testing-public/138.0.7204.15/mac-x64/chrome-mac-x64.zip",
302+
sha256 = "46dbfe39930cd3a2a45bc85a70bb49c291c258fde5be4d3d4deecc8e3181ae2f",
303+
strip_prefix = "chrome-mac-x64",
304+
patch_cmds = [
305+
"mv 'Google Chrome for Testing.app' Chrome.app",
306+
"mv 'Chrome.app/Contents/MacOS/Google Chrome for Testing' Chrome.app/Contents/MacOS/Chrome",
307+
],
308+
build_file_content = """
309+
load("@aspect_rules_js//js:defs.bzl", "js_library")
310+
package(default_visibility = ["//visibility:public"])
311+
312+
exports_files(["Chrome.app"])
313+
314+
js_library(
315+
name = "chrome-js",
316+
data = glob(["Chrome.app/**/*"]),
317+
)
318+
""",
319+
)
320+
http_archive(
321+
name = "linux_beta_chromedriver",
322+
url = "https://storage.googleapis.com/chrome-for-testing-public/138.0.7204.15/linux64/chromedriver-linux64.zip",
323+
sha256 = "b180e7569aa10a10e5b112b2b6cc21d126499122eaba0e90d264713285cc9104",
324+
strip_prefix = "chromedriver-linux64",
325+
build_file_content = """
326+
load("@aspect_rules_js//js:defs.bzl", "js_library")
327+
package(default_visibility = ["//visibility:public"])
328+
329+
exports_files(["chromedriver"])
330+
331+
js_library(
332+
name = "chromedriver-js",
333+
data = ["chromedriver"],
334+
)
335+
""",
336+
)
337+
338+
http_archive(
339+
name = "mac_beta_chromedriver",
340+
url = "https://storage.googleapis.com/chrome-for-testing-public/138.0.7204.15/mac-x64/chromedriver-mac-x64.zip",
341+
sha256 = "fda50dbab46115e2185cae0f3eeb8526c3f95175b0d4f7f7871aaf1e63590d5c",
342+
strip_prefix = "chromedriver-mac-x64",
343+
build_file_content = """
344+
load("@aspect_rules_js//js:defs.bzl", "js_library")
345+
package(default_visibility = ["//visibility:public"])
346+
347+
exports_files(["chromedriver"])
348+
273349
js_library(
274350
name = "chromedriver-js",
275351
data = ["chromedriver"],

py/selenium/webdriver/common/bidi/browsing_context.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,11 @@ class HistoryUpdatedParams:
335335
def __init__(
336336
self,
337337
context: str,
338+
timestamp: int,
338339
url: str,
339340
):
340341
self.context = context
342+
self.timestamp = timestamp
341343
self.url = url
342344

343345
@classmethod
@@ -356,12 +358,17 @@ def from_json(cls, json: dict) -> "HistoryUpdatedParams":
356358
if context is None or not isinstance(context, str):
357359
raise ValueError("context is required and must be a string")
358360

361+
timestamp = json.get("timestamp")
362+
if timestamp is None or not isinstance(timestamp, int) or timestamp < 0:
363+
raise ValueError("timestamp is required and must be a non-negative integer")
364+
359365
url = json.get("url")
360366
if url is None or not isinstance(url, str):
361367
raise ValueError("url is required and must be a string")
362368

363369
return cls(
364370
context=context,
371+
timestamp=timestamp,
365372
url=url,
366373
)
367374

rb/spec/integration/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package(default_visibility = ["//rb/spec/integration:__subpackages__"])
22

33
BROWSERS = [
44
"chrome",
5+
"chrome-beta",
56
"edge",
67
"firefox",
78
"ie",

rb/spec/integration/selenium/webdriver/chrome/BUILD.bazel

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ load("//rb/spec:tests.bzl", "rb_integration_test")
44
rb_integration_test(
55
name = file[:-8],
66
srcs = [file],
7-
browsers = ["chrome"], # No need to run in other browsers.
7+
# No need to run in other browsers.
8+
browsers = [
9+
"chrome",
10+
"chrome-beta",
11+
],
12+
data = ["//common/extensions"],
813
)
914
for file in glob(["*_spec.rb"])
1015
]

rb/spec/tests.bzl

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ load("@rules_ruby//ruby:defs.bzl", "rb_library", "rb_test")
22
load(
33
"//common:browsers.bzl",
44
"COMMON_TAGS",
5+
"chrome_beta_data",
56
"chrome_data",
67
"edge_data",
78
"firefox_beta_data",
@@ -32,6 +33,30 @@ BROWSERS = {
3233
"//conditions:default": {},
3334
}),
3435
},
36+
"chrome-beta": {
37+
"data": chrome_beta_data,
38+
"deps": ["//rb/lib/selenium/webdriver:chrome"],
39+
"tags": [],
40+
"target_compatible_with": [],
41+
"env": {
42+
"WD_REMOTE_BROWSER": "chrome",
43+
"WD_SPEC_DRIVER": "chrome",
44+
"WD_BROWSER_VERSION": "beta",
45+
} | select({
46+
"@selenium//common:use_pinned_linux_chrome": {
47+
"CHROME_BINARY": "$(location @linux_beta_chrome//:chrome-linux64/chrome)",
48+
"CHROMEDRIVER_BINARY": "$(location @linux_beta_chromedriver//:chromedriver)",
49+
},
50+
"@selenium//common:use_pinned_macos_chrome": {
51+
"CHROME_BINARY": "$(location @mac_beta_chrome//:Chrome.app)/Contents/MacOS/Chrome",
52+
"CHROMEDRIVER_BINARY": "$(location @mac_beta_chromedriver//:chromedriver)",
53+
},
54+
"//conditions:default": {},
55+
}) | select({
56+
"@selenium//common:use_headless_browser": {"HEADLESS": "true"},
57+
"//conditions:default": {},
58+
}),
59+
},
3560
"edge": {
3661
"data": edge_data,
3762
"deps": ["//rb/lib/selenium/webdriver:edge"],

scripts/github-actions/ci-build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -eufo pipefail
55
set -x
66

77
# Define heap size for GitHub Actions runner
8-
HEAP_SIZE="-Xmx4g"
8+
HEAP_SIZE="-Xmx8g"
99

1010
# Default to auto if no parameter is provided
1111
CACHE_RESULTS="auto"

0 commit comments

Comments
 (0)