mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(webdriver): frame url should not be updated on navigationStarted (#12536)
This commit is contained in:
parent
88df407517
commit
7d0423b12c
@ -219,7 +219,8 @@ export class BrowsingContext extends EventEmitter<{
|
||||
if (info.context !== this.id) {
|
||||
return;
|
||||
}
|
||||
this.#url = info.url;
|
||||
// Note: we should not update this.#url at this point since the context
|
||||
// has not finished navigating to the info.url yet.
|
||||
|
||||
for (const [id, request] of this.#requests) {
|
||||
if (request.disposed) {
|
||||
|
@ -744,13 +744,6 @@
|
||||
"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"],
|
||||
@ -3196,13 +3189,6 @@
|
||||
"expectations": ["SKIP"],
|
||||
"comment": "TODO: Needs support for arguments in network.provideResponse in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1853882"
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[requestinterception-experimental.spec] cooperative request interception Page.setRequestInterception should intercept",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
"parameters": ["firefox", "webDriverBiDi"],
|
||||
"expectations": ["SKIP"],
|
||||
"comment": "TODO: Needs Puppeteer support for BidiHTTPRequest.postData"
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[requestinterception-experimental.spec] cooperative request interception Page.setRequestInterception should load fonts if cache enabled",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
@ -3307,13 +3293,6 @@
|
||||
"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 intercept",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
"parameters": ["firefox", "webDriverBiDi"],
|
||||
"expectations": ["SKIP"],
|
||||
"comment": "TODO: Needs Puppeteer support for BidiHTTPRequest.postData"
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should load fonts if cache enabled",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
@ -3753,13 +3732,6 @@
|
||||
"expectations": ["FAIL"],
|
||||
"comment": "`HTTPRequest.resourceType()` has no eqivalent in BiDi spec"
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[requestinterception-experimental.spec] cooperative request interception Page.setRequestInterception should intercept",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
"parameters": ["chrome", "headless", "webDriverBiDi"],
|
||||
"expectations": ["FAIL"],
|
||||
"comment": "`request.postData()` has no eqivalent in BiDi spec"
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should be abortable",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
|
@ -104,10 +104,9 @@ describe('cooperative request interception', function () {
|
||||
expect(request.url()).toContain('empty.html');
|
||||
expect(request.headers()['user-agent']).toBeTruthy();
|
||||
expect(request.method()).toBe('GET');
|
||||
expect(request.postData()).toBe(undefined);
|
||||
expect(request.isNavigationRequest()).toBe(true);
|
||||
expect(request.frame()!.url()).toBe('about:blank');
|
||||
expect(request.frame() === page.mainFrame()).toBe(true);
|
||||
expect(request.frame()!.url()).toBe('about:blank');
|
||||
} catch (error) {
|
||||
requestError = error;
|
||||
} finally {
|
||||
@ -121,7 +120,6 @@ describe('cooperative request interception', function () {
|
||||
}
|
||||
|
||||
expect(response.ok()).toBe(true);
|
||||
expect(response.remoteAddress().port).toBe(server.PORT);
|
||||
});
|
||||
// @see https://github.com/puppeteer/puppeteer/pull/3105
|
||||
it('should work when POST is redirected with 302', async () => {
|
||||
|
@ -33,10 +33,9 @@ describe('request interception', function () {
|
||||
expect(request.url()).toContain('empty.html');
|
||||
expect(request.headers()['user-agent']).toBeTruthy();
|
||||
expect(request.method()).toBe('GET');
|
||||
expect(request.postData()).toBe(undefined);
|
||||
expect(request.isNavigationRequest()).toBe(true);
|
||||
expect(request.frame()!.url()).toBe('about:blank');
|
||||
expect(request.frame() === page.mainFrame()).toBe(true);
|
||||
expect(request.frame()!.url()).toBe('about:blank');
|
||||
} catch (error) {
|
||||
requestError = error;
|
||||
} finally {
|
||||
@ -50,7 +49,6 @@ describe('request interception', function () {
|
||||
}
|
||||
|
||||
expect(response.ok()).toBe(true);
|
||||
expect(response.remoteAddress().port).toBe(server.PORT);
|
||||
});
|
||||
// @see https://github.com/puppeteer/puppeteer/pull/3105
|
||||
it('should work when POST is redirected with 302', async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user