From a71c62f52320249ee27eeae2ecc8a4ab2927b3d7 Mon Sep 17 00:00:00 2001 From: Nikolay Vitkov <34244704+Lightning00Blade@users.noreply.github.com> Date: Thu, 28 Mar 2024 11:42:32 +0100 Subject: [PATCH] build(deps): bump chromium-bidi (#12171) --- package-lock.json | 8 +- packages/puppeteer-core/package.json | 2 +- test/TestExpectations.json | 111 ++++++++++++++++++++------- test/src/requestinterception.spec.ts | 6 +- 4 files changed, 94 insertions(+), 33 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1bb6886a47c..70701b2343a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12141,7 +12141,7 @@ "license": "Apache-2.0", "dependencies": { "@puppeteer/browsers": "2.2.0", - "chromium-bidi": "0.5.15", + "chromium-bidi": "0.5.16", "debug": "4.3.4", "devtools-protocol": "0.0.1262051", "ws": "8.16.0" @@ -12164,9 +12164,9 @@ "license": "MIT" }, "packages/puppeteer-core/node_modules/chromium-bidi": { - "version": "0.5.15", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.5.15.tgz", - "integrity": "sha512-IYovQ7eiP4oVWlUSKod6SxVVkEZ5Bpni8NmufkQ3BKZjO1Ix3hkZ4ssVK39rQjgkrMQPmYAoLUl1w895ytsZ0A==", + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.5.16.tgz", + "integrity": "sha512-IT5lnR44h/qZQ4GaCHvBxYIl4cQL2i9UvFyYeRyVdcpY04hx5H720HQfe/7Oz7ndxaYVLQFGpCO71J4X2Ye/Gw==", "dependencies": { "mitt": "3.0.1", "urlpattern-polyfill": "10.0.0", diff --git a/packages/puppeteer-core/package.json b/packages/puppeteer-core/package.json index 9f9796df2b3..0da7f438f6f 100644 --- a/packages/puppeteer-core/package.json +++ b/packages/puppeteer-core/package.json @@ -120,7 +120,7 @@ "license": "Apache-2.0", "dependencies": { "@puppeteer/browsers": "2.2.0", - "chromium-bidi": "0.5.15", + "chromium-bidi": "0.5.16", "debug": "4.3.4", "devtools-protocol": "0.0.1262051", "ws": "8.16.0" diff --git a/test/TestExpectations.json b/test/TestExpectations.json index 9cb4dbac456..e5b1defb14b 100644 --- a/test/TestExpectations.json +++ b/test/TestExpectations.json @@ -181,13 +181,6 @@ "expectations": ["SKIP"], "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" }, - { - "testIdPattern": "[requestinterception.spec] *", - "platforms": ["darwin", "linux", "win32"], - "parameters": ["webDriverBiDi"], - "expectations": ["SKIP"], - "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" - }, { "testIdPattern": "[screencast.spec] *", "platforms": ["darwin", "linux", "win32"], @@ -558,6 +551,13 @@ "expectations": ["FAIL"], "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" }, + { + "testIdPattern": "[navigation.spec] navigation Page.goto should navigate to URL with hash and fire requests without hash", + "platforms": ["darwin", "linux", "win32"], + "parameters": ["webDriverBiDi"], + "expectations": ["FAIL"], + "comment": "BiDi spec expect the request to not trim the hash" + }, { "testIdPattern": "[navigation.spec] navigation Page.goto should send referer", "platforms": ["darwin", "linux", "win32"], @@ -839,12 +839,6 @@ "expectations": ["SKIP"], "comment": "TODO: Needs full support for continueResponse in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1853887" }, - { - "testIdPattern": "[requestinterception.spec] *", - "platforms": ["darwin", "linux", "win32"], - "parameters": ["firefox", "webDriverBiDi"], - "expectations": ["PASS"] - }, { "testIdPattern": "[requestinterception.spec] *", "platforms": ["darwin", "linux", "win32"], @@ -852,6 +846,62 @@ "expectations": ["FAIL", "SKIP"], "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" }, + { + "testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should be abortable with custom error codes", + "platforms": ["darwin", "linux", "win32"], + "parameters": ["webDriverBiDi"], + "expectations": ["FAIL"], + "comment": "`HTTPRequest.resourceType()` has no eqivalent in BiDi spec" + }, + { + "testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should intercept", + "platforms": ["darwin", "linux", "win32"], + "parameters": ["webDriverBiDi"], + "expectations": ["FAIL"], + "comment": "`request.postData()` has no eqivalent in BiDi spec" + }, + { + "testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should navigate to URL with hash and fire requests without hash", + "platforms": ["darwin", "linux", "win32"], + "parameters": ["webDriverBiDi"], + "expectations": ["FAIL"], + "comment": "BiDi spec and WPT require expect the Hash" + }, + { + "testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should send referer", + "platforms": ["darwin", "linux", "win32"], + "parameters": ["webDriverBiDi"], + "expectations": ["FAIL"], + "comment": "`setExtraHTTPHeaders` not implemented" + }, + { + "testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should show custom HTTP headers", + "platforms": ["darwin", "linux", "win32"], + "parameters": ["webDriverBiDi"], + "expectations": ["FAIL"], + "comment": "`setExtraHTTPHeaders` not implemented" + }, + { + "testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should work with custom referer headers", + "platforms": ["darwin", "linux", "win32"], + "parameters": ["webDriverBiDi"], + "expectations": ["FAIL"], + "comment": "`setExtraHTTPHeaders` not implemented" + }, + { + "testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should work with redirects", + "platforms": ["darwin", "linux", "win32"], + "parameters": ["webDriverBiDi"], + "expectations": ["FAIL"], + "comment": "`HTTPRequest.resourceType()` has no eqivalent in BiDi spec" + }, + { + "testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should work with redirects for subresources", + "platforms": ["darwin", "linux", "win32"], + "parameters": ["webDriverBiDi"], + "expectations": ["FAIL"], + "comment": "`HTTPRequest.resourceType()` has no eqivalent in BiDi spec" + }, { "testIdPattern": "[requestinterception.spec] request interception Request.continue *", "platforms": ["darwin", "linux", "win32"], @@ -2502,13 +2552,6 @@ "expectations": ["SKIP"], "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" }, - { - "testIdPattern": "[navigation.spec] navigation Page.goto should navigate to URL with hash and fire requests without hash", - "platforms": ["darwin", "linux", "win32"], - "parameters": ["firefox", "webDriverBiDi"], - "expectations": ["FAIL"], - "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" - }, { "testIdPattern": "[navigation.spec] navigation Page.goto should not leak listeners during navigation", "platforms": ["darwin", "linux", "win32"], @@ -3583,6 +3626,13 @@ "expectations": ["SKIP"], "comment": "TODO: Needs support for enabling cache in BiDi without CDP https://github.com/w3c/webdriver-bidi/issues/582" }, + { + "testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should cache if cache enabled", + "platforms": ["darwin", "linux", "win32"], + "parameters": ["chrome", "webDriverBiDi"], + "expectations": ["FAIL"], + "comment": "TODO: Fixed in the next chromium-bidi release" + }, { "testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should intercept", "platforms": ["darwin", "linux", "win32"], @@ -3604,13 +3654,6 @@ "expectations": ["SKIP"], "comment": "TODO: Needs support for data URIs in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1805176" }, - { - "testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should navigate to URL with hash and fire requests without hash", - "platforms": ["darwin", "linux", "win32"], - "parameters": ["firefox", "webDriverBiDi"], - "expectations": ["FAIL"], - "comment": "TODO: Needs investigation, not clear why the test expects the hash to be removed" - }, { "testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should navigate to URL with hash and fire requests without hash", "platforms": ["darwin", "linux", "win32"], @@ -3695,12 +3738,26 @@ "expectations": ["SKIP"], "comment": "Test requires CDP" }, + { + "testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should work with requests without networkId", + "platforms": ["darwin", "linux", "win32"], + "parameters": ["chrome", "webDriverBiDi"], + "expectations": ["FAIL"], + "comment": "CDP specific issue, maybe we can support it from BiDi+" + }, { "testIdPattern": "[requestinterception.spec] request interception Request.continue should work", "platforms": ["darwin", "linux", "win32"], "parameters": ["firefox", "webDriverBiDi"], "expectations": ["PASS"] }, + { + "testIdPattern": "[requestinterception.spec] request interception Request.respond should redirect", + "platforms": ["darwin", "linux", "win32"], + "parameters": ["chrome", "webDriverBiDi"], + "expectations": ["FAIL"], + "comment": "Puppeteer request.redirectChain issue" + }, { "testIdPattern": "[screenshot.spec] Screenshots Cdp should use scale for clip", "platforms": ["darwin", "linux", "win32"], diff --git a/test/src/requestinterception.spec.ts b/test/src/requestinterception.spec.ts index d923a47aa7f..2f73ae6974e 100644 --- a/test/src/requestinterception.spec.ts +++ b/test/src/requestinterception.spec.ts @@ -87,7 +87,11 @@ describe('request interception', function () { }); void request.continue({headers}); }); - await page.goto(server.PREFIX + '/rrredirect'); + const [request] = await Promise.all([ + server.waitForRequest('/empty.html'), + page.goto(server.PREFIX + '/rrredirect'), + ]); + expect(request.headers['foo']).toBe('bar'); }); // @see https://github.com/puppeteer/puppeteer/issues/4743 it('should be able to remove headers', async () => {