This commit is contained in:
Cheng Zhao 2013-09-05 12:24:08 +08:00
Π ΠΎΠ΄ΠΈΡ‚Π΅Π»ΡŒ 256215b749
ΠšΠΎΠΌΠΌΠΈΡ‚ 8acd6d6c8a
1 ΠΈΠ·ΠΌΠ΅Π½Ρ‘Π½Π½Ρ‹Ρ… Ρ„Π°ΠΉΠ»ΠΎΠ²: 3 Π΄ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠΉ ΠΈ 1 ΡƒΠ΄Π°Π»Π΅Π½ΠΈΠΉ

ΠŸΡ€ΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„Π°ΠΉΠ»

@ -1,5 +1,6 @@
assert = require 'assert'
ipc = require 'ipc'
path = require 'path'
remote = require 'remote'
protocol = remote.require 'protocol'
@ -113,7 +114,8 @@ describe 'protocol API', ->
free()
assert false, 'Got error: ' + errorType + ' ' + error
protocol.interceptProtocol targetScheme, (request) ->
assert.equal request.url, "#{targetScheme}://#{__filename}"
pathInUrl = path.normalize request.url.substr(8)
assert.equal pathInUrl, __filename
it 'can override original protocol handler', (done) ->
handler = remote.createFunctionWithReturnValue 'valar morghulis'