From: Cheng Zhao Date: Tue, 27 Aug 2013 03:37:06 +0000 (+0800) Subject: Make sure referrer is sent to the protocol handler. X-Git-Tag: v0.4.4~6^2~21 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=799d9ada7dc334282f6eefc71206236af3da903d;p=electron.git Make sure referrer is sent to the protocol handler. --- diff --git a/spec/api/protocol.coffee b/spec/api/protocol.coffee index 7879d29b..0a947aba 100644 --- a/spec/api/protocol.coffee +++ b/spec/api/protocol.coffee @@ -12,8 +12,9 @@ describe 'protocol API', -> protocol.unregisterProtocol 'test1' it 'calls the callback when scheme is visited', (done) -> - protocol.registerProtocol 'test2', (url) -> + protocol.registerProtocol 'test2', (url, referrer) -> assert.equal url, 'test2://test2' + assert.equal referrer, window.location.toString() protocol.unregisterProtocol 'test2' done() $.get 'test2://test2', -> diff --git a/spec/index.html b/spec/index.html index c92cb81f..fd49cdfb 100644 --- a/spec/index.html +++ b/spec/index.html @@ -1,5 +1,6 @@ +