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:
trop[bot] 2024-05-13 16:59:43 +02:00 committed by GitHub
parent 9694e7593f
commit 75cefdb527
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 5 deletions

View file

@ -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);