Skip to content

Commit d2c4ef7

Browse files
authored
Merge branch 'SeleniumHQ:trunk' into py-cdp-generate-tests
2 parents 294333c + 8221fd1 commit d2c4ef7

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextInspectorTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ void canListenToNavigationCommittedEvent()
235235

236236
@Test
237237
@NeedsFreshDriver
238-
@NotYetImplemented(FIREFOX)
239238
void canListenToDownloadWillBeginEvent()
240239
throws ExecutionException, InterruptedException, TimeoutException {
241240
try (BrowsingContextInspector inspector = new BrowsingContextInspector(driver)) {

javascript/selenium-webdriver/test/bidi/network_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ suite(
9797

9898
assert.equal(beforeRequestEvent[0].request.method, 'GET')
9999
assert(beforeRequestEvent[0].request.url.includes('redirected_http_equiv.html'))
100-
assert.equal(beforeRequestEvent[2].request.method, 'GET')
101-
assert(beforeRequestEvent[2].request.url.includes('redirected.html'))
100+
assert.equal(beforeRequestEvent[1].request.method, 'GET')
101+
assert(beforeRequestEvent[1].request.url.includes('redirected.html'))
102102
})
103103

104104
it('can subscribe to response started', async function () {

scripts/update_cdp.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,23 @@ def old_chrome(chrome_milestone):
6464
return str(int(new_chrome(chrome_milestone)) - 3)
6565

6666

67+
def flatten_browser_pdl(file_path, chrome_version):
68+
"""Fetches all included domain .pdl files and concatenates them."""
69+
with open(file_path, "r") as file:
70+
content = file.read()
71+
# Find all include lines
72+
includes = re.findall(r"include domains/([A-Za-z0-9_]+\.pdl)", content)
73+
base_url = f"https://raw.githubusercontent.com/chromium/chromium/{chrome_version}/third_party/blink/public/devtools_protocol/domains/"
74+
concatenated = ""
75+
for domain_file in includes:
76+
url = base_url + domain_file
77+
response = http.request("GET", url)
78+
concatenated += response.data.decode("utf-8") + "\n"
79+
# Overwrite the file with concatenated domains
80+
with open(file_path, "w") as file:
81+
file.write(concatenated)
82+
83+
6784
def add_pdls(chrome_milestone):
6885
source_dir = (
6986
root_dir / f"common/devtools/chromium/v{previous_chrome(chrome_milestone)}"
@@ -84,6 +101,10 @@ def add_pdls(chrome_milestone):
84101
f"{target_dir}/browser_protocol.pdl",
85102
)
86103

104+
flatten_browser_pdl(
105+
f"{target_dir}/browser_protocol.pdl", chrome_milestone["version"]
106+
)
107+
87108
deps_content = http.request(
88109
"GET",
89110
f"https://raw.githubusercontent.com/chromium/chromium/{chrome_milestone['version']}/DEPS",

0 commit comments

Comments
 (0)