Add failing spec for webview visiblity changes
This commit is contained in:
parent
b86ded3b54
commit
1e15ce6ccd
3 changed files with 40 additions and 0 deletions
|
@ -867,4 +867,25 @@ describe('<webview> tag', function () {
|
|||
})
|
||||
w.loadURL('file://' + fixtures + '/pages/webview-zoom-factor.html')
|
||||
})
|
||||
|
||||
it('has the initial hidden state and receives visibilitychange events', function (done) {
|
||||
w = new BrowserWindow({
|
||||
show: false
|
||||
})
|
||||
|
||||
ipcMain.once('pong', function (event, visibilityState, hidden) {
|
||||
assert.equal(visibilityState, 'hidden')
|
||||
assert.equal(hidden, true)
|
||||
|
||||
w.webContents.send('ELECTRON_RENDERER_WINDOW_VISIBILITY_CHANGE', 'visible')
|
||||
|
||||
ipcMain.once('pong', function (event, visibilityState, hidden) {
|
||||
assert.equal(visibilityState, 'visible')
|
||||
assert.equal(hidden, false)
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
w.loadURL('file://' + fixtures + '/pages/webview-visibilitychange.html')
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue