test: add test for avif image format (#32815)
Fixes https://github.com/microsoft/playwright/issues/32673
This commit is contained in:
parent
5947c21dc7
commit
ded567d8f8
BIN
tests/assets/rgb.avif
Normal file
BIN
tests/assets/rgb.avif
Normal file
Binary file not shown.
|
|
@ -401,3 +401,14 @@ it('service worker should register in an iframe', async ({ page, server }) => {
|
||||||
});
|
});
|
||||||
expect(response).toBe('responseFromServiceWorker');
|
expect(response).toBe('responseFromServiceWorker');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should be able to render avif images', async ({ page, server, browserName, platform }) => {
|
||||||
|
it.fixme(browserName === 'webkit' && platform === 'win32');
|
||||||
|
await page.goto(server.EMPTY_PAGE);
|
||||||
|
await page.setContent(`<img src="${server.PREFIX}/rgb.avif" onerror="window.error = true">`);
|
||||||
|
await expect.poll(() => page.locator('img').boundingBox()).toEqual(expect.objectContaining({
|
||||||
|
width: 128,
|
||||||
|
height: 128,
|
||||||
|
}));
|
||||||
|
expect(await page.evaluate(() => (window as any).error)).toBe(undefined);
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue