Add new-window <webview> spec with nativeWindowOpen
This commit is contained in:
parent
da2b29796f
commit
a2a7a1d8c7
1 changed files with 11 additions and 0 deletions
|
@ -524,6 +524,17 @@ describe('<webview> tag', function () {
|
|||
webview.src = 'file://' + fixtures + '/pages/target-name.html'
|
||||
document.body.appendChild(webview)
|
||||
})
|
||||
|
||||
it('emits when nativeWindowOpen is enabled', function(done) {
|
||||
webview.addEventListener('new-window', function (e) {
|
||||
assert.equal(e.url, 'http://host/')
|
||||
assert.equal(e.frameName, 'host')
|
||||
done()
|
||||
})
|
||||
webview.setAttribute('webpreferences', 'nativeWindowOpen=1')
|
||||
webview.src = 'file://' + fixtures + '/pages/window-open.html'
|
||||
document.body.appendChild(webview)
|
||||
})
|
||||
})
|
||||
|
||||
describe('ipc-message event', function () {
|
||||
|
|
Loading…
Reference in a new issue