Π·Π΅ΡΠΊΠ°Π»ΠΎ ΠΈΠ· https://github.com/electron/electron.git
π fix the protocol module spec on OS X.
This commit is contained in:
Π ΠΎΠ΄ΠΈΡΠ΅Π»Ρ
6a322f8bd6
ΠΠΎΠΌΠΌΠΈΡ
bc9c95d77d
|
@ -114,8 +114,11 @@ describe 'protocol API', ->
|
|||
free()
|
||||
assert false, 'Got error: ' + errorType + ' ' + error
|
||||
protocol.interceptProtocol targetScheme, (request) ->
|
||||
pathInUrl = path.normalize request.url.substr(8)
|
||||
assert.equal pathInUrl, __filename
|
||||
if process.platform is 'win32'
|
||||
pathInUrl = path.normalize request.url.substr(8)
|
||||
assert.equal pathInUrl, __filename
|
||||
else
|
||||
assert.equal request.url, "#{targetScheme}://#{__filename}"
|
||||
|
||||
it 'can override original protocol handler', (done) ->
|
||||
handler = remote.createFunctionWithReturnValue 'valar morghulis'
|
||||
|
|
ΠΠ°Π³ΡΡΠ·ΠΊΠ°β¦
Π‘ΡΡΠ»ΠΊΠ° Π² Π½ΠΎΠ²ΠΎΠΉ Π·Π°Π΄Π°ΡΠ΅