mirror of
https://github.com/electron/electron.git
synced 2026-01-27 00:09:09 -05:00
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:
@@ -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')
|
||||
|
||||
2
spec/fixtures/pages/window-open.html
vendored
2
spec/fixtures/pages/window-open.html
vendored
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user