mirror of
https://github.com/microsoft/playwright.git
synced 2024-09-11 20:37:54 +03:00
feat(chromium-tip-of-tree): roll to r1234 (#31418)
This commit is contained in:
parent
dad305478a
commit
976373ed2c
@ -9,9 +9,9 @@
|
||||
},
|
||||
{
|
||||
"name": "chromium-tip-of-tree",
|
||||
"revision": "1231",
|
||||
"revision": "1234",
|
||||
"installByDefault": false,
|
||||
"browserVersion": "128.0.6536.0"
|
||||
"browserVersion": "128.0.6555.0"
|
||||
},
|
||||
{
|
||||
"name": "firefox",
|
||||
|
@ -319,7 +319,7 @@ export class Chromium extends BrowserType {
|
||||
if (process.env.PLAYWRIGHT_CHROMIUM_USE_HEADLESS_NEW)
|
||||
chromeArguments.push('--headless=new');
|
||||
else
|
||||
chromeArguments.push('--headless');
|
||||
chromeArguments.push('--headless=old');
|
||||
|
||||
chromeArguments.push(
|
||||
'--hide-scrollbars',
|
||||
|
@ -37,7 +37,7 @@ export function getExceptionMessage(exceptionDetails: Protocol.Runtime.Exception
|
||||
}
|
||||
|
||||
export async function releaseObject(client: CRSession, objectId: string) {
|
||||
await client.send('Runtime.releaseObject', { objectId }).catch(error => {});
|
||||
await client.send('Runtime.releaseObject', { objectId }).catch(error => { });
|
||||
}
|
||||
|
||||
export async function saveProtocolStream(client: CRSession, handle: string, path: string) {
|
||||
@ -91,7 +91,8 @@ export function exceptionToError(exceptionDetails: Protocol.Runtime.ExceptionDet
|
||||
|
||||
const err = new Error(message);
|
||||
err.stack = stack;
|
||||
err.name = name;
|
||||
const nameOverride = exceptionDetails.exception?.preview?.properties.find(o => o.name === 'name');
|
||||
err.name = nameOverride ? nameOverride.value ?? 'Error' : name;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -139,15 +139,14 @@ it('should not crash on showDirectoryPicker', async ({ page, server, browserName
|
||||
it.skip(browserName === 'chromium' && browserMajorVersion < 99, 'Fixed in Chromium r956769');
|
||||
it.skip(browserName !== 'chromium', 'showDirectoryPicker is only available in Chromium');
|
||||
await page.goto(server.EMPTY_PAGE);
|
||||
await Promise.race([
|
||||
page.evaluate(async () => {
|
||||
const dir = await (window as any).showDirectoryPicker();
|
||||
return dir.name;
|
||||
}).catch(e => expect(e.message).toContain('DOMException: The user aborted a request')),
|
||||
// The dialog will not be accepted, so we just wait for some time to
|
||||
// to give the browser a chance to crash.
|
||||
new Promise(r => setTimeout(r, 1000))
|
||||
]);
|
||||
page.evaluate(async () => {
|
||||
const dir = await (window as any).showDirectoryPicker();
|
||||
return dir.name;
|
||||
// In headless it throws (aborted), in headed it stalls (Test ended) and waits for the picker to be accepted.
|
||||
}).catch(e => expect(e.message).toMatch(/((DOMException|AbortError): The user aborted a request|Test ended)/));
|
||||
// The dialog will not be accepted, so we just wait for some time to
|
||||
// to give the browser a chance to crash.
|
||||
await page.waitForTimeout(3_000);
|
||||
});
|
||||
|
||||
it('should not crash on storage.getDirectory()', async ({ page, server, browserName, isMac }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user