feat: add win.getBackgroundColor() for macOS (#21448)
thanks @vbennich - great work on this 🌟
This commit is contained in:
parent
c1210f8ad3
commit
cf833a7650
10 changed files with 46 additions and 1 deletions
|
@ -834,6 +834,29 @@ describe('BrowserWindow module', () => {
|
|||
})
|
||||
})
|
||||
|
||||
describe('BrowserWindow.getBackgroundColor()', () => {
|
||||
it('returns default value if no backgroundColor is set', () => {
|
||||
w.destroy()
|
||||
w = new BrowserWindow({})
|
||||
expect(w.getBackgroundColor()).to.equal('#FFFFFF')
|
||||
})
|
||||
it('returns correct value if backgroundColor is set', () => {
|
||||
const backgroundColor = '#BBAAFF'
|
||||
w.destroy()
|
||||
w = new BrowserWindow({
|
||||
backgroundColor: backgroundColor
|
||||
})
|
||||
expect(w.getBackgroundColor()).to.equal(backgroundColor)
|
||||
})
|
||||
it('returns correct value from setBackgroundColor()', () => {
|
||||
const backgroundColor = '#AABBFF'
|
||||
w.destroy()
|
||||
w = new BrowserWindow({})
|
||||
w.setBackgroundColor(backgroundColor)
|
||||
expect(w.getBackgroundColor()).to.equal(backgroundColor)
|
||||
})
|
||||
})
|
||||
|
||||
describe(`BrowserWindow.getNormalBounds()`, () => {
|
||||
describe(`Normal state`, () => {
|
||||
it(`checks normal bounds after resize`, (done) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue