fix: BrowserView autoresizing conversion error (#42056)
This commit is contained in:
parent
3ea3b0e8e1
commit
c765d57265
3 changed files with 24 additions and 5 deletions
|
@ -1503,6 +1503,13 @@ describe('BrowserWindow module', () => {
|
|||
expectBoundsEqual(w.getBounds(), fullBounds);
|
||||
});
|
||||
|
||||
it('rounds non-integer bounds', () => {
|
||||
w.setBounds({ x: 440.5, y: 225.1, width: 500.4, height: 400.9 });
|
||||
|
||||
const bounds = w.getBounds();
|
||||
expect(bounds).to.deep.equal({ x: 441, y: 225, width: 500, height: 401 });
|
||||
});
|
||||
|
||||
it('sets the window bounds with partial bounds', () => {
|
||||
const fullBounds = { x: 440, y: 225, width: 500, height: 400 };
|
||||
w.setBounds(fullBounds);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue