Skip to content

Commit 5a63ef5

Browse files
committed
chore: revert image.
1 parent 16b87aa commit 5a63ef5

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed
466 Bytes
Loading

integration_tests/specs/dom/elements/img.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -311,18 +311,16 @@ describe('Tags img', () => {
311311
await snapshot(img);
312312
document.body.removeChild(img);
313313

314-
requestAnimationFrame(() => {
314+
setTimeout(() => {
315315
document.body.appendChild(img);
316-
setTimeout(async () => {
317-
await snapshot(img);
318-
}, 800);
319-
320-
// This GIF duration 1.5s, so we need wait 1.5s to make sure it can replay.
321-
setTimeout(async () => {
316+
// After next frame that image has shown.
317+
requestAnimationFrame(async () => {
318+
// When replay, the image should be same as first frame.
322319
await snapshot(img);
323320
done();
324-
}, 1500);
325-
});
321+
});
322+
// Delay 200ms to play gif.
323+
}, 200);
326324
};
327325

328326
document.body.appendChild(img);

0 commit comments

Comments
 (0)