fix the crash when loading site with jquery (#13475)

This commit is contained in:
Cheng Zhao 2018-06-29 09:42:04 +09:00 committed by GitHub
parent 8ad3a2cc42
commit e42c6d3eb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 1 deletions

View file

@ -79,6 +79,20 @@ describe('chromium feature', () => {
})
})
describe('loading jquery', () => {
it('does not crash', (done) => {
w = new BrowserWindow({
show: false,
webPreferences: {
nodeIntegration: false
}
})
w.webContents.once('did-finish-load', () => { done() })
w.webContents.once('crashed', () => done(new Error('WebContents crashed.')))
w.loadURL(`file://${fixtures}/pages/jquery.html`)
})
})
describe('navigator.webkitGetUserMedia', () => {
it('calls its callbacks', (done) => {
navigator.webkitGetUserMedia({