fix: avoid IPC for renderer webFrame.getZoom...
APIs (#45499)
* fix: avoid IPC for renderer `webFrame.getZoom...` APIs * Remove `DoGetZoomLevel` IPC * Fix synchronous behavior & nullptr deref * Use local root
This commit is contained in:
parent
e055ce7c39
commit
f5025b6246
7 changed files with 22 additions and 34 deletions
|
@ -176,15 +176,15 @@ describe('webFrame module', () => {
|
|||
|
||||
describe('setZoomFactor()', () => {
|
||||
it('works', async () => {
|
||||
const equal = await w.executeJavaScript('childFrame.setZoomFactor(2.0); childFrame.getZoomFactor() === 2.0');
|
||||
expect(equal).to.be.true();
|
||||
const zoom = await w.executeJavaScript('childFrame.setZoomFactor(2.0); childFrame.getZoomFactor()');
|
||||
expect(zoom).to.equal(2.0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('setZoomLevel()', () => {
|
||||
it('works', async () => {
|
||||
const equal = await w.executeJavaScript('childFrame.setZoomLevel(5); childFrame.getZoomLevel() === 5');
|
||||
expect(equal).to.be.true();
|
||||
const zoom = await w.executeJavaScript('childFrame.setZoomLevel(5); childFrame.getZoomLevel()');
|
||||
expect(zoom).to.equal(5);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue