Add webContents.focus() spec
This commit is contained in:
parent
be79417a03
commit
35908ac398
2 changed files with 36 additions and 0 deletions
|
@ -308,4 +308,16 @@ describe('webContents module', function () {
|
|||
}
|
||||
})
|
||||
})
|
||||
|
||||
describe('focus()', function () {
|
||||
it('focuses the parent window', function (done) {
|
||||
ipcMain.once('answer', (event, visible, focused) => {
|
||||
assert.equal(visible, true)
|
||||
assert.equal(focused, true)
|
||||
done()
|
||||
})
|
||||
w.show()
|
||||
w.loadURL('file://' + path.join(__dirname, 'fixtures', 'pages', 'focus-web-contents.html'))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue