Merge pull request #7494 from thomsonreuters/Update_Test_For_Missing_Additional_Features

Update BrowserWindow's test to check additional features upon window.open() call
This commit is contained in:
Cheng Zhao 2016-10-06 14:45:28 +09:00 committed by GitHub
commit 1781ceb25b
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>