mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
provide 'silent' param on snowflake proxy to disable confirmation dialog
This commit is contained in:
parent
91673a4abe
commit
39be8403a4
2 changed files with 11 additions and 1 deletions
|
@ -61,6 +61,7 @@ describe 'Snowflake', ->
|
|||
expect(s.proxyPairs.length).toBe 2
|
||||
|
||||
it 'gives a dialog when closing, only while active', ->
|
||||
silenceNotifications = false
|
||||
snowflake.state = MODE.WEBRTC_READY
|
||||
msg = window.onbeforeunload()
|
||||
expect(snowflake.state).toBe MODE.WEBRTC_READY
|
||||
|
@ -70,3 +71,10 @@ describe 'Snowflake', ->
|
|||
msg = window.onbeforeunload()
|
||||
expect(snowflake.state).toBe MODE.INIT
|
||||
expect(msg).toBe null
|
||||
|
||||
it 'does not give a dialog when silent flag is on', ->
|
||||
silenceNotifications = true
|
||||
snowflake.state = MODE.WEBRTC_READY
|
||||
msg = window.onbeforeunload()
|
||||
expect(snowflake.state).toBe MODE.WEBRTC_READY
|
||||
expect(msg).toBe null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue