spec: Split the session.protocol test into multiple tests

This commit is contained in:
Cheng Zhao 2016-06-23 13:14:33 +09:00
parent 71ab69314c
commit a04c0ce196

View file

@ -295,17 +295,21 @@ describe('session module', function () {
partitionProtocol.unregisterProtocol(protocolName, () => done())
})
it('handles requests from a partition', function (done) {
it('does not affect defaultSession', function (done) {
protocol.isProtocolHandled(protocolName, function (result) {
assert.equal(result, false)
partitionProtocol.isProtocolHandled(protocolName, function (result) {
assert.equal(result, true)
done()
})
})
})
it('handles requests from partition', function (done) {
w.webContents.on('did-finish-load', function () {
done()
})
w.loadURL(protocolName + "://fake-host")
})
})
w.loadURL(`${protocolName}://fake-host`)
})
})
})