allow protocol module initialization before app ready.

* ensure registerStandardSchemes can only be called before app ready
 * ensure other protocol methods can only be used after app ready
This commit is contained in:
deepak1556 2016-05-08 00:13:23 +05:30
parent 1ff33b7c81
commit 0f2ae385ed
5 changed files with 66 additions and 25 deletions

View file

@ -818,7 +818,7 @@ describe('protocol module', function () {
})
describe('protocol.registerStandardSchemes', function () {
const standardScheme = 'app'
const standardScheme = remote.getGlobal('standardScheme')
const origin = standardScheme + '://fake-host'
const imageURL = origin + '/test.png'
const filePath = path.join(__dirname, 'fixtures', 'pages', 'b.html')
@ -826,10 +826,6 @@ describe('protocol module', function () {
var w = null
var success = null
before(function () {
protocol.registerStandardSchemes([standardScheme])
})
beforeEach(function () {
w = new BrowserWindow({show: false})
success = false