зеркало из https://github.com/electron/electron.git
remove deprecated signature tests
This commit is contained in:
Родитель
2660859434
Коммит
d40cce92bf
|
@ -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')
|
||||
|
|
Загрузка…
Ссылка в новой задаче