parent
820c72af55
commit
bb1e4c2208
3 changed files with 9 additions and 29 deletions
|
@ -5,7 +5,6 @@ const qs = require('querystring');
|
|||
const remote = require('electron').remote;
|
||||
const BrowserWindow = remote.require('electron').BrowserWindow;
|
||||
const protocol = remote.require('electron').protocol;
|
||||
const session = remote.require('electron').session;
|
||||
|
||||
describe('protocol module', function() {
|
||||
var protocolName = 'sp';
|
||||
|
@ -819,7 +818,7 @@ describe('protocol module', function() {
|
|||
|
||||
describe('protocol.fromPartition', function() {
|
||||
var partitionName = 'temp';
|
||||
var tempProtocol = session.fromPartition(partitionName).protocol;
|
||||
var tempProtocol = protocol.fromPartition(partitionName);
|
||||
var w = null;
|
||||
|
||||
beforeEach(function() {
|
||||
|
@ -853,18 +852,17 @@ describe('protocol module', function() {
|
|||
if (error) {
|
||||
return done(error);
|
||||
}
|
||||
|
||||
protocol.isProtocolHandled(protocolName, function(result) {
|
||||
assert.equal(result, false);
|
||||
});
|
||||
tempProtocol.isProtocolHandled(protocolName, function(result) {
|
||||
assert.equal(result, true);
|
||||
w.webContents.on('did-finish-load', function() {
|
||||
done();
|
||||
});
|
||||
w.loadURL(protocolName + "://fake-host");
|
||||
});
|
||||
});
|
||||
w.webContents.on('did-finish-load', function() {
|
||||
done();
|
||||
});
|
||||
w.loadURL(protocolName + "://fake-host");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue