diff --git a/tests/assets/rgb.avif b/tests/assets/rgb.avif new file mode 100644 index 0000000000000..d79bff8a21b9d Binary files /dev/null and b/tests/assets/rgb.avif differ diff --git a/tests/library/capabilities.spec.ts b/tests/library/capabilities.spec.ts index 816f647ef4bb7..bde5a8bd0bbe5 100644 --- a/tests/library/capabilities.spec.ts +++ b/tests/library/capabilities.spec.ts @@ -401,3 +401,14 @@ it('service worker should register in an iframe', async ({ page, server }) => { }); 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(``); + await expect.poll(() => page.locator('img').boundingBox()).toEqual(expect.objectContaining({ + width: 128, + height: 128, + })); + expect(await page.evaluate(() => (window as any).error)).toBe(undefined); +});