Update BrowserWindow's test to check additional features upon window.open() call

This commit is contained in:
Michael Vasseur 2016-10-05 13:45:15 +02:00
parent ebaeec1677
commit edd80d88a9
2 changed files with 3 additions and 2 deletions

View file

@ -818,10 +818,11 @@ describe('browser-window module', function () {
}
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()
assert.equal(url, 'http://host/')
assert.equal(frameName, 'host')
assert.equal(additionalFeatures[0], 'this-is-not-a-standard-feature')
done()
})
w.loadURL('file://' + fixtures + '/pages/window-open.html')

View file

@ -1,7 +1,7 @@
<html>
<body>
<script type="text/javascript" charset="utf-8">
window.open('http://host', 'host');
window.open('http://host', 'host' , 'this-is-not-a-standard-feature');
</script>
</body>
</html>