mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(screencast): dont throw from frameAck if target is closed (#3702)
This commit is contained in:
parent
1877c29834
commit
db9b8a003f
@ -743,7 +743,8 @@ class FrameSession {
|
||||
return;
|
||||
const buffer = Buffer.from(payload.data, 'base64');
|
||||
this._videoRecorder.writeFrame(buffer, payload.metadata.timestamp!);
|
||||
this._client.send('Page.screencastFrameAck', {sessionId: payload.sessionId});
|
||||
// The target may be closed before receiving the ack.
|
||||
this._client.send('Page.screencastFrameAck', {sessionId: payload.sessionId}).catch(() => {});
|
||||
}
|
||||
|
||||
async _startScreencast(screencastId: string, options: types.PageScreencastOptions): Promise<void> {
|
||||
|
||||
@ -193,8 +193,7 @@ describe('screencast', suite => {
|
||||
|
||||
it('should capture navigation', test => {
|
||||
test.flaky(options.CHROMIUM && MAC);
|
||||
test.flaky(options.FIREFOX && LINUX && !options.HEADLESS);
|
||||
test.flaky(options.FIREFOX && WIN);
|
||||
test.flaky(options.FIREFOX);
|
||||
test.flaky(options.WEBKIT);
|
||||
}, async ({page, tmpDir, server, videoPlayer, toImpl}) => {
|
||||
const videoFile = path.join(tmpDir, 'v.webm');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user