Add BrowserWindow.getOpacity for consistency

This commit is contained in:
Taeho Kim 2017-10-03 00:08:10 +09:00
parent 7df5182901
commit 7570ec9d39
9 changed files with 29 additions and 2 deletions

View file

@ -804,13 +804,17 @@ describe('BrowserWindow module', function () {
height: 400,
opacity: 0.5
})
assert.equal(w.getOpacity(), 0.5)
})
it('allows setting the opacity', function () {
assert.doesNotThrow(function () {
w.setOpacity(0.0)
assert.equal(w.getOpacity(), 0.0)
w.setOpacity(0.5)
assert.equal(w.getOpacity(), 0.5)
w.setOpacity(1.0)
assert.equal(w.getOpacity(), 1.0)
})
})
})