feat: add getBounds() method for BrowserView (#19370)

* implement getBounds on mac

* add Linux/Win impl

* add test

* add docs
This commit is contained in:
Micha Hanselmann 2019-07-29 19:43:05 -07:00 committed by Shelley Vohr
parent c06007175f
commit 42a483ad27
9 changed files with 39 additions and 0 deletions

View file

@ -92,6 +92,15 @@ describe('BrowserView module', () => {
})
})
describe('BrowserView.getBounds()', () => {
it('returns the current bounds', () => {
view = new BrowserView()
const bounds = { x: 10, y: 20, width: 30, height: 40 }
view.setBounds(bounds)
expect(view.getBounds()).to.deep.equal(bounds)
})
})
describe('BrowserWindow.setBrowserView()', () => {
it('does not throw for valid args', () => {
view = new BrowserView()