Add spec for useNativeWindowOpen
This commit is contained in:
parent
319a7759d0
commit
6bbfe89f96
2 changed files with 28 additions and 0 deletions
|
@ -1069,6 +1069,23 @@ describe('BrowserWindow module', function () {
|
|||
w.loadURL('file://' + path.join(fixtures, 'pages', 'window-open.html'))
|
||||
})
|
||||
})
|
||||
|
||||
describe('useNativeWindowOpen option', () => {
|
||||
it('allows synchronous access to window opened by window.open()', (done) => {
|
||||
ipcMain.once('answer', function (event, content) {
|
||||
assert.equal(content, 'Hello')
|
||||
done()
|
||||
})
|
||||
w.destroy()
|
||||
w = new BrowserWindow({
|
||||
show: false,
|
||||
webPreferences: {
|
||||
nativeWindowOpen: true
|
||||
}
|
||||
})
|
||||
w.loadURL('file://' + path.join(fixtures, 'api', 'native-window-open.html'))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('beforeunload handler', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue