return null when theme color is not found
This commit is contained in:
parent
4bc4a0c45b
commit
eeb2e58ad8
4 changed files with 29 additions and 2 deletions
|
@ -654,4 +654,21 @@ describe('webContents module', function () {
|
|||
gen.next()
|
||||
})
|
||||
})
|
||||
|
||||
describe('did-change-theme-color event', () => {
|
||||
it('is triggered with correct theme color', (done) => {
|
||||
var count = 0
|
||||
w.webContents.on('did-change-theme-color', (e, color) => {
|
||||
if (count === 0) {
|
||||
count++
|
||||
assert.equal(color, '#FFEEDD')
|
||||
w.loadURL('file://' + path.join(__dirname, 'fixtures', 'pages', 'base-page.html'))
|
||||
} else if (count === 1) {
|
||||
assert.equal(color, null)
|
||||
done()
|
||||
}
|
||||
})
|
||||
w.loadURL('file://' + path.join(__dirname, 'fixtures', 'pages', 'theme-color.html'))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue