Merge pull request #13050 from electron/3.0.0-deprecations

chore: removal of 3.0.0 deprecations
This commit is contained in:
Charles Kerr 2018-05-30 09:25:36 +02:00 committed by GitHub
commit b89fe86fa1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 76 additions and 421 deletions

View file

@ -587,35 +587,6 @@ describe('session module', () => {
w.loadURL(`https://127.0.0.1:${server.address().port}`)
})
describe('deprecated function signature', () => {
it('supports accepting the request', (done) => {
session.defaultSession.setCertificateVerifyProc((hostname, certificate, callback) => {
assert.equal(hostname, '127.0.0.1')
callback(true)
})
w.webContents.once('did-finish-load', () => {
assert.equal(w.webContents.getTitle(), 'hello')
done()
})
w.loadURL(`https://127.0.0.1:${server.address().port}`)
})
it('supports rejecting the request', (done) => {
session.defaultSession.setCertificateVerifyProc((hostname, certificate, callback) => {
assert.equal(hostname, '127.0.0.1')
callback(false)
})
const url = `https://127.0.0.1:${server.address().port}`
w.webContents.once('did-finish-load', () => {
assert.equal(w.webContents.getTitle(), url)
done()
})
w.loadURL(url)
})
})
it('rejects the request when the callback is called with -2', (done) => {
session.defaultSession.setCertificateVerifyProc(({hostname, certificate, verificationResult}, callback) => {
assert.equal(hostname, '127.0.0.1')

View file

@ -133,16 +133,16 @@ describe('security warnings', () => {
w.loadURL(`http://127.0.0.1:8881/base-page-security.html`)
})
it('should warn about blinkFeatures', (done) => {
it('should warn about enableBlinkFeatures', (done) => {
w = new BrowserWindow({
show: false,
webPreferences: {
blinkFeatures: ['my-cool-feature'],
enableBlinkFeatures: ['my-cool-feature'],
nodeIntegration: false
}
})
w.webContents.once('console-message', (e, level, message) => {
assert(message.includes('blinkFeatures'), message)
assert(message.includes('enableBlinkFeatures'), message)
done()
})