Add spec for deleting Buffer global in preload

This commit is contained in:
Kevin Sawicki 2016-09-08 10:34:09 -07:00
parent d476227e16
commit aaf2bb2751
2 changed files with 27 additions and 0 deletions

View file

@ -542,6 +542,22 @@ describe('browser-window module', function () {
})
w.loadURL('file://' + path.join(fixtures, 'api', 'preload.html'))
})
it('can successfully delete the Buffer global', function (done) {
var preload = path.join(fixtures, 'module', 'delete-buffer.js')
ipcMain.once('answer', function (event, test) {
assert.equal(test.toString(), 'buffer')
done()
})
w.destroy()
w = new BrowserWindow({
show: false,
webPreferences: {
preload: preload
}
})
w.loadURL('file://' + path.join(fixtures, 'api', 'preload.html'))
})
})
describe('"node-integration" option', function () {