From a04c0ce196504db97d286b6d5eb7ae46e774f7f1 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 23 Jun 2016 13:14:33 +0900 Subject: [PATCH] spec: Split the session.protocol test into multiple tests --- spec/api-session-spec.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/spec/api-session-spec.js b/spec/api-session-spec.js index 874726db9f8c..f634f1ce6345 100644 --- a/spec/api-session-spec.js +++ b/spec/api-session-spec.js @@ -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) - w.webContents.on('did-finish-load', function () { - done() - }) - w.loadURL(protocolName + "://fake-host") + done() }) }) }) + + it('handles requests from partition', function (done) { + w.webContents.on('did-finish-load', function () { + done() + }) + w.loadURL(`${protocolName}://fake-host`) + }) }) })