chore: remove deprecated capturer count APIs (#37075)

chore: remove deprecated incrementCapturerCount() / decrementCapturerCount()

Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
Milan Burda 2023-02-06 16:54:47 +01:00 committed by GitHub
parent 7dcd97f864
commit 8d382b9c60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 0 additions and 99 deletions

View file

@ -398,28 +398,8 @@ describe('BrowserView module', () => {
});
await view.webContents.loadFile(path.join(fixtures, 'pages', 'a.html'));
view.webContents.incrementCapturerCount();
const image = await view.webContents.capturePage();
expect(image.isEmpty()).to.equal(false);
});
it('should increase the capturer count', () => {
view = new BrowserView({
webPreferences: {
backgroundThrottling: false
}
});
w.setBrowserView(view);
view.setBounds({
...w.getBounds(),
x: 0,
y: 0
});
view.webContents.incrementCapturerCount();
expect(view.webContents.isBeingCaptured()).to.be.true();
view.webContents.decrementCapturerCount();
expect(view.webContents.isBeingCaptured()).to.be.false();
});
});
});