mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
test: enable showDirectoryPicker test (#11669)
This commit is contained in:
parent
0606afb2e6
commit
81a7b2488f
@ -124,13 +124,18 @@ it('should not crash on page with mp4 #smoke', async ({ page, server, platform,
|
|||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not crash on showDirectoryPicker', async ({ page, server, platform, browserName }) => {
|
it('should not crash on showDirectoryPicker', async ({ page, server, browserName, browserMajorVersion }) => {
|
||||||
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/7339' });
|
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/7339' });
|
||||||
it.fixme(browserName === 'chromium', 'https://github.com/microsoft/playwright/issues/7339, crashes');
|
it.skip(browserName === 'chromium' && browserMajorVersion < 99, 'Fixed in Chromium r956769');
|
||||||
it.skip(browserName !== 'chromium', 'showDirectoryPicker is only available in Chromium');
|
it.skip(browserName !== 'chromium', 'showDirectoryPicker is only available in Chromium');
|
||||||
await page.goto(server.EMPTY_PAGE);
|
await page.goto(server.EMPTY_PAGE);
|
||||||
await page.evaluate(async () => {
|
await Promise.race([
|
||||||
const dir = await (window as any).showDirectoryPicker();
|
page.evaluate(async () => {
|
||||||
return dir.name;
|
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))
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user