Add failing <webview> with nativeWindowOpen spec
This commit is contained in:
parent
aceea50f41
commit
a16cd0bd03
1 changed files with 14 additions and 0 deletions
|
@ -1650,4 +1650,18 @@ describe('<webview> tag', function () {
|
|||
w.loadURL(`file://${fixtures}/pages/webview-origin-zoom-level.html`)
|
||||
})
|
||||
})
|
||||
|
||||
describe('nativeWindowOpen option', () => {
|
||||
it('opens a windows with cross-scripting enabled', (done) => {
|
||||
ipcMain.once('answer', (event, content) => {
|
||||
assert.equal(content, 'Hello')
|
||||
done()
|
||||
})
|
||||
|
||||
webview.setAttribute('nodeintegration', 'on')
|
||||
webview.setAttribute('webpreferences', 'nativeWindowOpen=1')
|
||||
webview.src = 'file://' + path.join(fixtures, 'api', 'native-window-open-blank.html')
|
||||
document.body.appendChild(webview)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue