diff --git a/spec/api-session-spec.js b/spec/api-session-spec.js index c01abcc6edd3..8451fc0cc937 100644 --- a/spec/api-session-spec.js +++ b/spec/api-session-spec.js @@ -1,5 +1,6 @@ const assert = require('assert') const http = require('http') +const https = require('https') const path = require('path') const fs = require('fs') const {closeWindow} = require('./window-helpers') @@ -457,7 +458,7 @@ describe('session module', function () { }) }) - describe('ses.getblobData(identifier, callback)', function () { + describe('ses.getBlobData(identifier, callback)', function () { it('returns blob data for uuid', function (done) { const scheme = 'temp' const protocol = session.defaultSession.protocol @@ -507,4 +508,60 @@ describe('session module', function () { }) }) }) + + describe('ses.setCertificateVerifyProc(callback)', function () { + var server = null + + beforeEach(function (done) { + var certPath = path.join(__dirname, 'fixtures', 'certificates') + var options = { + key: fs.readFileSync(path.join(certPath, 'server.key')), + cert: fs.readFileSync(path.join(certPath, 'server.pem')), + ca: [ + fs.readFileSync(path.join(certPath, 'rootCA.pem')), + fs.readFileSync(path.join(certPath, 'intermediateCA.pem')) + ], + requestCert: true, + rejectUnauthorized: false + } + + server = https.createServer(options, function (req, res) { + res.writeHead(200) + res.end('