chore: remove deprecated capturer count APIs (#37148)

chore: remove deprecated incrementCapturerCount() / decrementCapturerCount()

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
trop[bot]
2023-02-06 11:25:58 -08:00
committed by GitHub
parent 705ef4bc60
commit 792a7c5913
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();
});
});
});

View File

@@ -1789,7 +1789,6 @@ describe('BrowserWindow module', () => {
w.loadFile(path.join(fixtures, 'pages', 'a.html'));
await emittedOnce(w, 'ready-to-show');
w.webContents.incrementCapturerCount();
const image = await w.capturePage();
expect(image.isEmpty()).to.equal(false);
});
@@ -1807,14 +1806,6 @@ describe('BrowserWindow module', () => {
// Values can be 0,2,3,4, or 6. We want 6, which is RGB + Alpha
expect(imgBuffer[25]).to.equal(6);
});
it('should increase the capturer count', () => {
const w = new BrowserWindow({ show: false });
w.webContents.incrementCapturerCount();
expect(w.webContents.isBeingCaptured()).to.be.true();
w.webContents.decrementCapturerCount();
expect(w.webContents.isBeingCaptured()).to.be.false();
});
});
describe('BrowserWindow.setProgressBar(progress)', () => {