chore: revert deprecated WebContents properties (#22640)
* chore: revert deprecated WebContents properties * Fix failing zoomFactor test
This commit is contained in:
parent
0c02d794c9
commit
1b353d1ed3
5 changed files with 124 additions and 65 deletions
|
@ -3958,19 +3958,23 @@ describe('BrowserWindow module', () => {
|
|||
})
|
||||
})
|
||||
|
||||
// TODO(codebytere): remove in Electron v8.0.0
|
||||
describe('window.webContents.getFrameRate()', () => {
|
||||
it('has default frame rate', (done) => {
|
||||
describe('frameRate APIs', () => {
|
||||
it('has default frame rate (functions)', (done) => {
|
||||
w.webContents.once('paint', function () {
|
||||
expect(w.webContents.getFrameRate()).to.equal(60)
|
||||
done()
|
||||
})
|
||||
w.loadFile(path.join(fixtures, 'api', 'offscreen-rendering.html'))
|
||||
})
|
||||
})
|
||||
|
||||
// TODO(codebytere): remove in Electron v8.0.0
|
||||
describe('window.webContents.setFrameRate(frameRate)', () => {
|
||||
it('has default frame rate', (done) => {
|
||||
w.webContents.once('paint', function () {
|
||||
expect(w.webContents.frameRate).to.equal(60)
|
||||
done()
|
||||
})
|
||||
w.loadFile(path.join(fixtures, 'api', 'offscreen-rendering.html'))
|
||||
})
|
||||
|
||||
it('sets custom frame rate', (done) => {
|
||||
w.webContents.on('dom-ready', () => {
|
||||
w.webContents.setFrameRate(30)
|
||||
|
@ -3981,16 +3985,6 @@ describe('BrowserWindow module', () => {
|
|||
})
|
||||
w.loadFile(path.join(fixtures, 'api', 'offscreen-rendering.html'))
|
||||
})
|
||||
})
|
||||
|
||||
describe('window.webContents.FrameRate', () => {
|
||||
it('has default frame rate', (done) => {
|
||||
w.webContents.once('paint', function () {
|
||||
expect(w.webContents.frameRate).to.equal(60)
|
||||
done()
|
||||
})
|
||||
w.loadFile(path.join(fixtures, 'api', 'offscreen-rendering.html'))
|
||||
})
|
||||
|
||||
it('sets custom frame rate', (done) => {
|
||||
w.webContents.on('dom-ready', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue