]> khamidou — GitHub mirrors - electron.git/commitdiff
:lipstick: fix the protocol module spec on OS X.
authorCheng Zhao <zcbenz@gmail.com>
Thu, 5 Sep 2013 10:28:48 +0000 (18:28 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 5 Sep 2013 10:28:48 +0000 (18:28 +0800)
spec/api/protocol.coffee

index 0f3176da22a0f5e20f33264311c9cee90feedf78..9459d333efa328e024a9aa4209b9feb2baac00bf 100644 (file)
@@ -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'