Update BrowserWindow's test to check additional features upon window.open() call
This commit is contained in:
parent
ebaeec1677
commit
edd80d88a9
2 changed files with 3 additions and 2 deletions
|
@ -818,10 +818,11 @@ describe('browser-window module', function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
it('emits when window.open is called', function (done) {
|
it('emits when window.open is called', function (done) {
|
||||||
w.webContents.once('new-window', function (e, url, frameName) {
|
w.webContents.once('new-window', function (e, url, frameName, disposition, options, additionalFeatures) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
assert.equal(url, 'http://host/')
|
assert.equal(url, 'http://host/')
|
||||||
assert.equal(frameName, 'host')
|
assert.equal(frameName, 'host')
|
||||||
|
assert.equal(additionalFeatures[0], 'this-is-not-a-standard-feature')
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
w.loadURL('file://' + fixtures + '/pages/window-open.html')
|
w.loadURL('file://' + fixtures + '/pages/window-open.html')
|
||||||
|
|
2
spec/fixtures/pages/window-open.html
vendored
2
spec/fixtures/pages/window-open.html
vendored
|
@ -1,7 +1,7 @@
|
||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
window.open('http://host', 'host');
|
window.open('http://host', 'host' , 'this-is-not-a-standard-feature');
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue