update signature for setCertificateVerifyProc in session spec
This commit is contained in:
Родитель
6935addd38
Коммит
2660859434
|
@ -589,7 +589,7 @@ describe('session module', () => {
|
||||||
|
|
||||||
describe('deprecated function signature', () => {
|
describe('deprecated function signature', () => {
|
||||||
it('supports accepting the request', (done) => {
|
it('supports accepting the request', (done) => {
|
||||||
session.defaultSession.setCertificateVerifyProc((hostname, certificate, callback) => {
|
session.defaultSession.setCertificateVerifyProc(({hostname, certificate}, callback) => {
|
||||||
assert.equal(hostname, '127.0.0.1')
|
assert.equal(hostname, '127.0.0.1')
|
||||||
callback(true)
|
callback(true)
|
||||||
})
|
})
|
||||||
|
@ -602,7 +602,7 @@ describe('session module', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('supports rejecting the request', (done) => {
|
it('supports rejecting the request', (done) => {
|
||||||
session.defaultSession.setCertificateVerifyProc((hostname, certificate, callback) => {
|
session.defaultSession.setCertificateVerifyProc(({hostname, certificate}, callback) => {
|
||||||
assert.equal(hostname, '127.0.0.1')
|
assert.equal(hostname, '127.0.0.1')
|
||||||
callback(false)
|
callback(false)
|
||||||
})
|
})
|
||||||
|
|
|
@ -133,16 +133,16 @@ describe('security warnings', () => {
|
||||||
w.loadURL(`http://127.0.0.1:8881/base-page-security.html`)
|
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({
|
w = new BrowserWindow({
|
||||||
show: false,
|
show: false,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
blinkFeatures: ['my-cool-feature'],
|
enableBlinkFeatures: ['my-cool-feature'],
|
||||||
nodeIntegration: false
|
nodeIntegration: false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
w.webContents.once('console-message', (e, level, message) => {
|
w.webContents.once('console-message', (e, level, message) => {
|
||||||
assert(message.includes('blinkFeatures'), message)
|
assert(message.includes('enableBlinkFeatures'), message)
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче