From: Cheng Zhao Date: Thu, 29 Aug 2013 12:57:09 +0000 (+0800) Subject: Add spec for protocol.isHandledProtocol. X-Git-Tag: v0.4.4~6^2~17 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=c2fd43c3e88e662db9236207fd130def53ad8b26;p=electron.git Add spec for protocol.isHandledProtocol. --- diff --git a/spec/api/protocol.coffee b/spec/api/protocol.coffee index 0a947aba..8d374315 100644 --- a/spec/api/protocol.coffee +++ b/spec/api/protocol.coffee @@ -70,3 +70,10 @@ describe 'protocol API', -> error: (xhr, errorType, error) -> assert false, 'Got error: ' + errorType + ' ' + error protocol.unregisterProtocol 'atom-file-job' + + describe 'protocol.isHandledProtocol', -> + it 'returns true if the scheme can be handled', (done) -> + assert.equal protocol.isHandledProtocol('file'), true + assert.equal protocol.isHandledProtocol('http'), true + assert.equal protocol.isHandledProtocol('https'), true + assert.equal protocol.isHandledProtocol('atom'), false