Skip to content

Commit

Permalink
Merge pull request #685 from openkraken/fix/multi-frame-image-replay
Browse files Browse the repository at this point in the history
 🐛 fix: make multi frame image can replay.
  • Loading branch information
andycall authored Sep 16, 2021
2 parents eb3f37d + 908be58 commit 6f65955
Show file tree
Hide file tree
Showing 38 changed files with 400 additions and 333 deletions.
Binary file added integration_tests/assets/sample-gif-138k.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added integration_tests/assets/sample-gif-40k.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('Background-origin', () => {
]
);
append(BODY, div);
await snapshot();
await snapshot(0.1);
});

it('works with padding-box', async () => {
Expand All @@ -73,7 +73,7 @@ describe('Background-origin', () => {
]
);
append(BODY, div);
await snapshot();
await snapshot(0.1);
});

it('works with content-box', async () => {
Expand All @@ -99,6 +99,6 @@ describe('Background-origin', () => {
]
);
append(BODY, div);
await snapshot();
await snapshot(0.1);
});
});
14 changes: 9 additions & 5 deletions integration_tests/specs/css/css-display/containing-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ describe('containing-block', () => {
);
document.body.appendChild(p);

await snapshot(0.5);
await snapshot(0.1);
});
it('007', async () => {
let p;
Expand Down Expand Up @@ -945,7 +945,7 @@ describe('containing-block', () => {
);
document.body.appendChild(div);

await snapshot(0.5);
await snapshot(0.1);
});
it('019', async () => {
let p;
Expand Down Expand Up @@ -1018,9 +1018,10 @@ describe('containing-block', () => {

await snapshot();
});
it('020-ref', async () => {
it('020-ref', async (done) => {
let p;
let div;
let img;
p = createElement(
'p',
{
Expand Down Expand Up @@ -1051,7 +1052,7 @@ describe('containing-block', () => {
},
},
[
createElement('img', {
img = createElement('img', {
src: 'assets/blue96x96.png',
width: '96',
height: '96',
Expand All @@ -1063,7 +1064,10 @@ describe('containing-block', () => {
document.body.appendChild(p);
document.body.appendChild(div);

await snapshot(0.5);
img.onload = async () => {
await snapshot();
done();
}
});
it('020', async () => {
let p;
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/specs/css/css-flexbox/css-flexbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,6 @@ describe('css-flexbox', () => {
BODY.appendChild(p);
BODY.appendChild(flexbox);

await snapshot();
await snapshot(0.1);
});
});
6 changes: 3 additions & 3 deletions integration_tests/specs/css/css-flexbox/flex_shrink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ describe('flexbox flex-shrink', () => {
);
BODY.appendChild(constrainedFlex);

await snapshot();
await snapshot(0.1);
});

it('should work with intrinsic element with min-height', async () => {
Expand Down Expand Up @@ -210,7 +210,7 @@ describe('flexbox flex-shrink', () => {
);
BODY.appendChild(constrainedFlex);

await snapshot();
await snapshot(0.2);
});

it('should work with intrinsic element with width and no height', async () => {
Expand Down Expand Up @@ -239,7 +239,7 @@ describe('flexbox flex-shrink', () => {
);
BODY.appendChild(constrainedFlex);

await snapshot();
await snapshot(0.1);
});

it('should work with flex layout in the column direction with children and height is not larger than children height', async () => {
Expand Down
20 changes: 10 additions & 10 deletions integration_tests/specs/css/css-flow/block-replaced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('block-replaced', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot(0.5);
await snapshot(0.1);
});
it('height-001', async () => {
let p;
Expand Down Expand Up @@ -85,7 +85,7 @@ describe('block-replaced', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
it('height-002-ref', async () => {
let p;
Expand Down Expand Up @@ -140,7 +140,7 @@ describe('block-replaced', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot(0.5);
await snapshot(0.1);
});
xit('height-003', async () => {
let p;
Expand Down Expand Up @@ -202,7 +202,7 @@ describe('block-replaced', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
it('height-004-ref', async () => {
let p;
Expand Down Expand Up @@ -236,7 +236,7 @@ describe('block-replaced', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
it('height-004', async () => {
let p;
Expand Down Expand Up @@ -290,7 +290,7 @@ describe('block-replaced', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
xit('height-005', async () => {
let p;
Expand Down Expand Up @@ -398,7 +398,7 @@ describe('block-replaced', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
it('width-001', async () => {
let p;
Expand Down Expand Up @@ -460,7 +460,7 @@ describe('block-replaced', () => {
BODY.appendChild(p);
BODY.appendChild(div1);

await snapshot();
await snapshot(0.1);
});
it('width-002-ref', async () => {
let p;
Expand Down Expand Up @@ -525,7 +525,7 @@ describe('block-replaced', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
xit('width-002', async () => {
let p;
Expand Down Expand Up @@ -914,6 +914,6 @@ describe('block-replaced', () => {
BODY.appendChild(p);
BODY.appendChild(div1);

await snapshot();
await snapshot(0.1);
});
});
8 changes: 4 additions & 4 deletions integration_tests/specs/css/css-flow/containing-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ describe('containing-block', () => {
);
BODY.appendChild(p);

await snapshot();
await snapshot(0.1);
});
it('007', async () => {
let p;
Expand Down Expand Up @@ -432,7 +432,7 @@ describe('containing-block', () => {
);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
it('009', async () => {
let p;
Expand Down Expand Up @@ -945,7 +945,7 @@ describe('containing-block', () => {
);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
it('019', async () => {
let p;
Expand Down Expand Up @@ -1063,7 +1063,7 @@ describe('containing-block', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
it('020', async () => {
let p;
Expand Down
32 changes: 16 additions & 16 deletions integration_tests/specs/css/css-position/absolute-non.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe('absolute-non', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
xit('replaced-height-002', async () => {
let p;
Expand Down Expand Up @@ -233,7 +233,7 @@ describe('absolute-non', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
xit('replaced-height-003', async () => {
let p;
Expand Down Expand Up @@ -461,7 +461,7 @@ describe('absolute-non', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
xit('replaced-height-006', async () => {
let p;
Expand Down Expand Up @@ -582,7 +582,7 @@ describe('absolute-non', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);

await snapshot();
});
Expand Down Expand Up @@ -696,7 +696,7 @@ describe('absolute-non', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
xit('replaced-height-008', async () => {
let p;
Expand Down Expand Up @@ -796,7 +796,7 @@ describe('absolute-non', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
xit('replaced-height-009', async () => {
let p;
Expand Down Expand Up @@ -1188,7 +1188,7 @@ describe('absolute-non', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
xit('replaced-max-height-002', async () => {
let p;
Expand Down Expand Up @@ -1297,7 +1297,7 @@ describe('absolute-non', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
xit('replaced-max-height-003', async () => {
let p;
Expand Down Expand Up @@ -1592,7 +1592,7 @@ describe('absolute-non', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
xit('replaced-max-height-007', async () => {
let p;
Expand Down Expand Up @@ -1716,7 +1716,7 @@ describe('absolute-non', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
xit('replaced-max-height-008', async () => {
let p;
Expand Down Expand Up @@ -1823,7 +1823,7 @@ describe('absolute-non', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
xit('replaced-max-height-009', async () => {
let p;
Expand Down Expand Up @@ -2204,7 +2204,7 @@ describe('absolute-non', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
xit('replaced-width-002', async () => {
let p;
Expand Down Expand Up @@ -2332,7 +2332,7 @@ describe('absolute-non', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
xit('replaced-width-003', async () => {
let p;
Expand Down Expand Up @@ -2760,7 +2760,7 @@ describe('absolute-non', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
xit('replaced-width-008', async () => {
let p;
Expand Down Expand Up @@ -3337,7 +3337,7 @@ describe('absolute-non', () => {
BODY.appendChild(p);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
it('replaced-width-015', async () => {
let p;
Expand Down Expand Up @@ -4338,6 +4338,6 @@ describe('absolute-non', () => {
BODY.appendChild(p_1);
BODY.appendChild(div);

await snapshot();
await snapshot(0.1);
});
});
Loading

0 comments on commit 6f65955

Please sign in to comment.