From 799d9ada7dc334282f6eefc71206236af3da903d Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 27 Aug 2013 11:37:06 +0800 Subject: [PATCH] Make sure referrer is sent to the protocol handler. --- spec/api/protocol.coffee | 3 ++- spec/index.html | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/api/protocol.coffee b/spec/api/protocol.coffee index 7879d29b016..0a947aba62e 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 c92cb81f58b..fd49cdfbe50 100644 --- a/spec/index.html +++ b/spec/index.html @@ -1,5 +1,6 @@ +