fix: BrowserView autoresizing conversion error (#42138)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
9694e7593f
commit
75cefdb527
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