mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: BiDi close error (#10687)
This commit is contained in:
parent
4a0a2bb2db
commit
f4c711e25b
@ -394,6 +394,10 @@ export class Page extends PageBase {
|
|||||||
return this.#networkManager.getNavigationResponse(id);
|
return this.#networkManager.getNavigationResponse(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override isClosed(): boolean {
|
||||||
|
return this.#closedDeferred.finished();
|
||||||
|
}
|
||||||
|
|
||||||
override async close(): Promise<void> {
|
override async close(): Promise<void> {
|
||||||
if (this.#closedDeferred.finished()) {
|
if (this.#closedDeferred.finished()) {
|
||||||
return;
|
return;
|
||||||
|
@ -71,6 +71,12 @@
|
|||||||
"parameters": [],
|
"parameters": [],
|
||||||
"expectations": ["PASS"]
|
"expectations": ["PASS"]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"testIdPattern": "[injected.spec] PuppeteerUtil tests *",
|
||||||
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
|
"parameters": ["webDriverBiDi"],
|
||||||
|
"expectations": ["PASS"]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"testIdPattern": "[jshandle.spec] *",
|
"testIdPattern": "[jshandle.spec] *",
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
@ -1181,6 +1187,18 @@
|
|||||||
"parameters": ["webDriverBiDi"],
|
"parameters": ["webDriverBiDi"],
|
||||||
"expectations": ["PASS"]
|
"expectations": ["PASS"]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"testIdPattern": "[page.spec] Page Page.close should set the page close state",
|
||||||
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
|
"parameters": ["webDriverBiDi"],
|
||||||
|
"expectations": ["PASS"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"testIdPattern": "[page.spec] Page Page.close should terminate network waiters",
|
||||||
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
|
"parameters": ["webDriverBiDi"],
|
||||||
|
"expectations": ["PASS"]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"testIdPattern": "[page.spec] Page Page.Events.Close should work with page.close",
|
"testIdPattern": "[page.spec] Page Page.Events.Close should work with page.close",
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
@ -3964,11 +3982,5 @@
|
|||||||
"platforms": ["darwin", "linux", "win32"],
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
"parameters": ["cdp", "chrome", "headless"],
|
"parameters": ["cdp", "chrome", "headless"],
|
||||||
"expectations": ["FAIL", "PASS"]
|
"expectations": ["FAIL", "PASS"]
|
||||||
},
|
|
||||||
{
|
|
||||||
"testIdPattern": "[injected.spec] PuppeteerUtil tests *",
|
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
|
||||||
"parameters": ["webDriverBiDi"],
|
|
||||||
"expectations": ["PASS"]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -107,7 +107,10 @@ describe('Launcher specs', function () {
|
|||||||
]);
|
]);
|
||||||
for (let i = 0; i < 2; i++) {
|
for (let i = 0; i < 2; i++) {
|
||||||
const message = results[i].message;
|
const message = results[i].message;
|
||||||
expect(message).toContain('Target closed');
|
expect(message).atLeastOneToContain([
|
||||||
|
'Target closed',
|
||||||
|
'Page closed!',
|
||||||
|
]);
|
||||||
expect(message).not.toContain('Timeout');
|
expect(message).not.toContain('Timeout');
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -110,7 +110,7 @@ describe('Page', function () {
|
|||||||
]);
|
]);
|
||||||
for (let i = 0; i < 2; i++) {
|
for (let i = 0; i < 2; i++) {
|
||||||
const message = results[i].message;
|
const message = results[i].message;
|
||||||
expect(message).toContain('Target closed');
|
expect(message).atLeastOneToContain(['Target closed', 'Page closed!']);
|
||||||
expect(message).not.toContain('Timeout');
|
expect(message).not.toContain('Timeout');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user