fix
This commit is contained in:
parent
4560b96067
commit
edc052b863
|
|
@ -439,7 +439,7 @@ function snapshotScript(...targetIds: (string | undefined)[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (isTopFrame) {
|
if (!isTopFrame) {
|
||||||
for (const canvas of canvasElements) {
|
for (const canvas of canvasElements) {
|
||||||
const context = canvas.getContext('2d')!;
|
const context = canvas.getContext('2d')!;
|
||||||
drawCheckerboard(context, canvas);
|
drawCheckerboard(context, canvas);
|
||||||
|
|
|
||||||
|
|
@ -1461,7 +1461,7 @@ test('canvas clipping in iframe', async ({ runAndTrace, page, server }) => {
|
||||||
await rafraf(page, 5);
|
await rafraf(page, 5);
|
||||||
});
|
});
|
||||||
|
|
||||||
const snapshot = await traceViewer.snapshotFrame('page.waitForTimeout');
|
const snapshot = await traceViewer.snapshotFrame('page.evaluate');
|
||||||
const canvas = snapshot.locator('iframe').contentFrame().locator('canvas');
|
const canvas = snapshot.locator('iframe').contentFrame().locator('canvas');
|
||||||
await expect(canvas).toHaveAttribute('title', `Playwright displays canvas contents on a best-effort basis. It doesn't support canvas elements inside an iframe yet. If this impacts your workflow, please open an issue so we can prioritize.`);
|
await expect(canvas).toHaveAttribute('title', `Playwright displays canvas contents on a best-effort basis. It doesn't support canvas elements inside an iframe yet. If this impacts your workflow, please open an issue so we can prioritize.`);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue