spec: Split the session.protocol test into multiple tests
This commit is contained in:
parent
71ab69314c
commit
a04c0ce196
1 changed files with 9 additions and 5 deletions
|
@ -295,17 +295,21 @@ describe('session module', function () {
|
||||||
partitionProtocol.unregisterProtocol(protocolName, () => done())
|
partitionProtocol.unregisterProtocol(protocolName, () => done())
|
||||||
})
|
})
|
||||||
|
|
||||||
it('handles requests from a partition', function (done) {
|
it('does not affect defaultSession', function (done) {
|
||||||
protocol.isProtocolHandled(protocolName, function (result) {
|
protocol.isProtocolHandled(protocolName, function (result) {
|
||||||
assert.equal(result, false)
|
assert.equal(result, false)
|
||||||
partitionProtocol.isProtocolHandled(protocolName, function (result) {
|
partitionProtocol.isProtocolHandled(protocolName, function (result) {
|
||||||
assert.equal(result, true)
|
assert.equal(result, true)
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('handles requests from partition', function (done) {
|
||||||
w.webContents.on('did-finish-load', function () {
|
w.webContents.on('did-finish-load', function () {
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
w.loadURL(protocolName + "://fake-host")
|
w.loadURL(`${protocolName}://fake-host`)
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue