Make sure referrer is sent to the protocol handler.
This commit is contained in:
parent
15ba32b489
commit
799d9ada7d
2 changed files with 3 additions and 1 deletions
|
@ -12,8 +12,9 @@ describe 'protocol API', ->
|
||||||
protocol.unregisterProtocol 'test1'
|
protocol.unregisterProtocol 'test1'
|
||||||
|
|
||||||
it 'calls the callback when scheme is visited', (done) ->
|
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 url, 'test2://test2'
|
||||||
|
assert.equal referrer, window.location.toString()
|
||||||
protocol.unregisterProtocol 'test2'
|
protocol.unregisterProtocol 'test2'
|
||||||
done()
|
done()
|
||||||
$.get 'test2://test2', ->
|
$.get 'test2://test2', ->
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta name="referrer" content="always">
|
||||||
<link href="../node_modules/mocha/mocha.css" rel="stylesheet">
|
<link href="../node_modules/mocha/mocha.css" rel="stylesheet">
|
||||||
<script src="jquery-2.0.3.min.js"></script>
|
<script src="jquery-2.0.3.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in a new issue