From: Cheng Zhao Date: Thu, 5 Sep 2013 04:24:08 +0000 (+0800) Subject: :lipstick: fix spec failure caused by win32 path delimiter. X-Git-Tag: v0.4.4~3 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=8acd6d6c8a38a639887091c0f4ce3e297b18eed8;p=electron.git :lipstick: fix spec failure caused by win32 path delimiter. --- diff --git a/spec/api/protocol.coffee b/spec/api/protocol.coffee index 2a2c8175..0f3176da 100644 --- a/spec/api/protocol.coffee +++ b/spec/api/protocol.coffee @@ -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'