Skip to content

Commit 493ccb8

Browse files
authored
Roll pinned browser versions (#12719)
Updated the bidi tests, since the `NavigationId` will never by `null` in a bidi navigation event
1 parent cd61441 commit 493ccb8

File tree

4 files changed

+53
-41
lines changed

4 files changed

+53
-41
lines changed

common/repositories.bzl

+21-19
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ def pin_browsers():
1010

1111
http_archive(
1212
name = "linux_firefox",
13-
url = "https://ftp.mozilla.org/pub/firefox/releases/115.0.3/linux-x86_64/en-US/firefox-115.0.3.tar.bz2",
14-
sha256 = "ee8980afe907fa552b52d573073e298b7878558faff8e8d5a4a7444f4f2d2cca",
13+
url = "https://ftp.mozilla.org/pub/firefox/releases/117.0/linux-x86_64/en-US/firefox-117.0.tar.bz2",
14+
sha256 = "5acf61aed42bbf43dff8fee90c55fd3bcecb1c710b86cdd2c380b5e4db7f3998",
1515
build_file_content = """
1616
filegroup(
1717
name = "files",
@@ -27,8 +27,8 @@ exports_files(
2727

2828
dmg_archive(
2929
name = "mac_firefox",
30-
url = "https://ftp.mozilla.org/pub/firefox/releases/115.0.3/mac/en-US/Firefox%20115.0.3.dmg",
31-
sha256 = "96b2616d0f95352caad756a200e0b13d20ee300be1d02fdfd3bab17ed6e73fa3",
30+
url = "https://ftp.mozilla.org/pub/firefox/releases/117.0/mac/en-US/Firefox%20117.0.dmg",
31+
sha256 = "eb9fcd6a7ea0feb56d64795367c32a1faea93db113d40b7a6b93e178af56e258",
3232
build_file_content = "exports_files([\"Firefox.app\"])",
3333
)
3434

@@ -48,32 +48,32 @@ exports_files(
4848

4949
pkg_archive(
5050
name = "mac_edge",
51-
url = "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/1a586fcf-50fb-4714-9994-bef23c695628/MicrosoftEdge-115.0.1901.188.pkg",
52-
sha256 = "c1bd8ab7e5d8972918ef089027515de14c892fb371a5b2c0322acadb46d29be8",
51+
url = "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/a989b093-c982-4d31-95d1-2c439f49b7e7/MicrosoftEdge-116.0.1938.76.pkg",
52+
sha256 = "d8676eb179b94be62e3a088367ae4525c96cd7bd79afdf3571b1e560a96c5643",
5353
move = {
54-
"MicrosoftEdge-115.0.1901.188.pkg/Payload/Microsoft Edge.app": "Edge.app",
54+
"MicrosoftEdge-116.0.1938.76.pkg/Payload/Microsoft Edge.app": "Edge.app",
5555
},
5656
build_file_content = "exports_files([\"Edge.app\"])",
5757
)
5858

5959
http_archive(
6060
name = "linux_edgedriver",
61-
url = "https://msedgedriver.azureedge.net/115.0.1901.188/edgedriver_linux64.zip",
62-
sha256 = "8a5d10f0d6c43ecf1c6c503a301defcf648a46440c32437862add99839bc4446",
61+
url = "https://msedgedriver.azureedge.net/116.0.1938.76/edgedriver_linux64.zip",
62+
sha256 = "85b06da1719907402e4d78a1467e06539185c38b238019b6efb503000f3f04f8",
6363
build_file_content = "exports_files([\"msedgedriver\"])",
6464
)
6565

6666
http_archive(
6767
name = "mac_edgedriver",
68-
url = "https://msedgedriver.azureedge.net/115.0.1901.188/edgedriver_mac64.zip",
69-
sha256 = "934fdf4f620cba11ba039e8e7dc40a7e23d0a49b5896e5ba53f3be1fe7b4e6ef",
68+
url = "https://msedgedriver.azureedge.net/116.0.1938.76/edgedriver_mac64.zip",
69+
sha256 = "3b0b2ba7e7a7e99c78a00a3a830fe72d2c3825d66e592ce3664cff563ddc6828",
7070
build_file_content = "exports_files([\"msedgedriver\"])",
7171
)
7272

7373
http_archive(
7474
name = "linux_chrome",
75-
url = "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5790.102/linux64/chrome-linux64.zip",
76-
sha256 = "aebaecf70965f152a743935a95d0013de3e9d96e194106eb13dfc1b9b1c7892c",
75+
url = "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/116.0.5845.96/linux64/chrome-linux64.zip",
76+
sha256 = "5d8ab1f999071b213d85e46ea4505d99df818b6fd0f8449e79710cb5403ba858",
7777
build_file_content = """
7878
filegroup(
7979
name = "files",
@@ -89,8 +89,8 @@ exports_files(
8989

9090
http_archive(
9191
name = "mac_chrome",
92-
url = "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5790.102/mac-x64/chrome-mac-x64.zip",
93-
sha256 = "76e2fbb782e195259e7e7873ffca0e7270d52066af79a0d401c92d66382420ec",
92+
url = "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/116.0.5845.96/mac-x64/chrome-mac-x64.zip",
93+
sha256 = "edc8e78f7a4b618037067593b2cb79ff571c16da0b955bc05a500af34b77d2fe",
9494
strip_prefix = "chrome-mac-x64",
9595
patch_cmds = [
9696
"mv 'Google Chrome for Testing.app' Chrome.app",
@@ -101,14 +101,16 @@ exports_files(
101101

102102
http_archive(
103103
name = "linux_chromedriver",
104-
url = "https://chromedriver.storage.googleapis.com/114.0.5735.90/chromedriver_linux64.zip",
105-
sha256 = "a7787ef8b139170cab4abfca4a0284fd5d006bfd979624b4af25b64d583a6f44",
104+
url = "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/116.0.5845.96/linux64/chromedriver-linux64.zip",
105+
sha256 = "17d225af124f9483a5d79a547f28f34253d7a1ef603ab7fb5ee185c0e4c71535",
106+
strip_prefix = "chromedriver-linux64",
106107
build_file_content = "exports_files([\"chromedriver\"])",
107108
)
108109

109110
http_archive(
110111
name = "mac_chromedriver",
111-
url = "https://chromedriver.storage.googleapis.com/114.0.5735.90/chromedriver_mac64.zip",
112-
sha256 = "6abdc9d358c2bc4668bef7b23048de2a9dbd3ad82cfbc6dfe322e74d4cff1650",
112+
url = "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/116.0.5845.96/mac-x64/chromedriver-mac-x64.zip",
113+
sha256 = "3ec691569dc8e98d803cf206c5fd4627e56836c81a5d1c9b7e5644a4e61ffd3f",
114+
strip_prefix = "chromedriver-mac-x64",
113115
build_file_content = "exports_files([\"chromedriver\"])",
114116
)

java/test/org/openqa/selenium/bidi/BiDiTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ void canNavigateAndListenToErrors()
6969
page = server.whereIs("/bidi/logEntryAdded.html");
7070
NavigationResult info = browsingContext.navigate(page, ReadinessState.COMPLETE);
7171

72+
// If navigation was successful, we expect both the url and navigation id to be set
7273
assertThat(browsingContext.getId()).isNotEmpty();
73-
assertThat(info.getNavigationId()).isNull();
74+
assertThat(info.getNavigationId()).isNotNull();
7475
assertThat(info.getUrl()).contains("/bidi/logEntryAdded.html");
7576

7677
driver.findElement(By.id("jsException")).click();

java/test/org/openqa/selenium/grid/router/RemoteWebDriverBiDiTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ void canNavigateToUrl() {
154154
NavigationResult info = browsingContext.navigate(url);
155155

156156
assertThat(browsingContext.getId()).isNotEmpty();
157-
assertThat(info.getNavigationId()).isNull();
157+
assertThat(info.getNavigationId()).isNotNull();
158158
assertThat(info.getUrl()).contains("/bidi/logEntryAdded.html");
159159
}
160160

scripts/pinned_browsers.py

+29-20
Original file line numberDiff line numberDiff line change
@@ -19,51 +19,60 @@ def calculate_hash(url):
1919
h.update(b)
2020
return h.hexdigest()
2121

22-
def chromedriver():
23-
r = http.request('GET', 'https://chromedriver.storage.googleapis.com/LATEST_RELEASE')
24-
v = r.data.decode('utf-8')
22+
def get_chrome_milestone():
23+
channel = "Stable"
24+
r = http.request('GET', f'https://chromiumdash.appspot.com/fetch_releases?channel={channel}&num=1&platform=Mac,Linux')
25+
all_versions = json.loads(r.data)
26+
# use the same milestone for all chrome releases, so pick the lowest
27+
milestone = min([version["milestone"] for version in all_versions if version["milestone"]])
28+
r = http.request('GET', 'https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json')
29+
versions = json.loads(r.data)["versions"]
2530

31+
return sorted(
32+
filter(lambda v: v['version'].split('.')[0] == str(milestone), versions),
33+
key=lambda v: LegacyVersion(v['version'])
34+
)[-1]
35+
36+
def chromedriver():
2637
content = ""
2738

28-
linux = 'https://chromedriver.storage.googleapis.com/%s/chromedriver_linux64.zip' % v
39+
selected_version = get_chrome_milestone()
40+
41+
drivers = selected_version["downloads"]["chromedriver"]
42+
43+
linux = [d["url"] for d in drivers if d["platform"] == "linux64"][0]
2944
sha = calculate_hash(linux)
45+
3046
content = content + """
3147
http_archive(
3248
name = "linux_chromedriver",
3349
url = "%s",
3450
sha256 = "%s",
51+
strip_prefix = "chromedriver-linux64",
3552
build_file_content = "exports_files([\\"chromedriver\\"])",
3653
)
3754
""" % (linux, sha)
3855

39-
mac = 'https://chromedriver.storage.googleapis.com/%s/chromedriver_mac64.zip' % v
56+
mac = [d["url"] for d in drivers if d["platform"] == "mac-x64"][0]
4057
sha = calculate_hash(mac)
4158
content = content + """
4259
http_archive(
4360
name = "mac_chromedriver",
4461
url = "%s",
4562
sha256 = "%s",
63+
strip_prefix = "chromedriver-mac-x64",
4664
build_file_content = "exports_files([\\"chromedriver\\"])",
4765
)
4866
""" % (mac, sha)
67+
4968
return content
5069

5170
def chrome():
52-
channel = "Stable"
53-
r = http.request('GET', f'https://chromiumdash.appspot.com/fetch_releases?channel={channel}&num=1&platform=Win32,Windows,Mac,Linux')
54-
milestone = json.loads(r.data)[0]["milestone"]
55-
56-
r = http.request('GET', 'https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json')
57-
versions = json.loads(r.data)["versions"]
58-
59-
selected_version = sorted(
60-
filter(lambda v: v['version'].split('.')[0] == str(milestone), versions),
61-
key=lambda v: LegacyVersion(v['version'])
62-
)[-1]
71+
selected_version = get_chrome_milestone()
6372

64-
downloads = selected_version["downloads"]["chrome"]
73+
chrome_downloads = selected_version["downloads"]["chrome"]
6574

66-
linux = [d["url"] for d in downloads if d["platform"] == "linux64"][0]
75+
linux = [d["url"] for d in chrome_downloads if d["platform"] == "linux64"][0]
6776
sha = calculate_hash(linux)
6877

6978
content = """
@@ -86,7 +95,7 @@ def chrome():
8695
8796
""" % (linux, sha)
8897

89-
mac = [d["url"] for d in downloads if d["platform"] == "mac-x64"][0]
98+
mac = [d["url"] for d in chrome_downloads if d["platform"] == "mac-x64"][0]
9099
sha = calculate_hash(mac)
91100

92101
content += """
@@ -99,7 +108,7 @@ def chrome():
99108
"mv 'Google Chrome for Testing.app' Chrome.app",
100109
"mv 'Chrome.app/Contents/MacOS/Google Chrome for Testing' Chrome.app/Contents/MacOS/Chrome",
101110
],
102-
build_file_content = "exports_files([\\"Google Chrome for Testing.app\\"])",
111+
build_file_content = "exports_files([\\"Chrome.app\\"])",
103112
)
104113
105114
""" % (mac, sha)

0 commit comments

Comments
 (0)