Add spec for deleting Buffer global in preload
This commit is contained in:
parent
d476227e16
commit
aaf2bb2751
2 changed files with 27 additions and 0 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue