Wrap passed 'url' and 'referrer' in an 'request' object.
This commit is contained in:
parent
abd3e86fb1
commit
4bdd1b88ad
2 changed files with 17 additions and 5 deletions
|
@ -12,9 +12,9 @@ describe 'protocol API', ->
|
|||
protocol.unregisterProtocol 'test1'
|
||||
|
||||
it 'calls the callback when scheme is visited', (done) ->
|
||||
protocol.registerProtocol 'test2', (url, referrer) ->
|
||||
assert.equal url, 'test2://test2'
|
||||
assert.equal referrer, window.location.toString()
|
||||
protocol.registerProtocol 'test2', (request) ->
|
||||
assert.equal request.url, 'test2://test2'
|
||||
assert.equal request.referrer, window.location.toString()
|
||||
protocol.unregisterProtocol 'test2'
|
||||
done()
|
||||
$.get 'test2://test2', ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue