fix: compensate for title bar height when setting bounds on BrowserView
(#34713)
fix: compensate for title bar height when setting bounds
This commit is contained in:
parent
d0e220cbce
commit
75f9573e53
2 changed files with 39 additions and 9 deletions
|
@ -146,7 +146,14 @@ describe('BrowserView module', () => {
|
|||
});
|
||||
|
||||
describe('BrowserView.getBounds()', () => {
|
||||
it('returns the current bounds', () => {
|
||||
it('returns correct bounds on a framed window', () => {
|
||||
view = new BrowserView();
|
||||
const bounds = { x: 10, y: 20, width: 30, height: 40 };
|
||||
view.setBounds(bounds);
|
||||
expect(view.getBounds()).to.deep.equal(bounds);
|
||||
});
|
||||
|
||||
it('returns correct bounds on a frameless window', () => {
|
||||
view = new BrowserView();
|
||||
const bounds = { x: 10, y: 20, width: 30, height: 40 };
|
||||
view.setBounds(bounds);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue