[Pkg-javascript-commits] [sockjs-client] 326/434: New test: close on close
Tonnerre Lombard
tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:22 UTC 2014
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch master
in repository sockjs-client.
commit e3b99c38de86be4b929a49b279e3569db6934f67
Author: Marek Majkowski <majek04 at gmail.com>
Date: Wed Jan 18 13:35:54 2012 +0000
New test: close on close
---
tests/html/src/endtoendtests.coffee | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/tests/html/src/endtoendtests.coffee b/tests/html/src/endtoendtests.coffee
index 59840cf..4cd62fd 100644
--- a/tests/html/src/endtoendtests.coffee
+++ b/tests/html/src/endtoendtests.coffee
@@ -100,3 +100,21 @@ asyncTest "disabled websocket test", ->
equals(e.reason, "All transports failed")
equals(e.wasClean, false)
start()
+
+asyncTest "close on close", ->
+ expect(4)
+ r = newSockJS('/close', 'jsonp-polling')
+ r.onopen = (e) ->
+ ok(true)
+ r.onmessage = (e) ->
+ ok(false)
+ r.onclose = (e) ->
+ equals(e.code, 3000)
+ equals(e.reason, "Go away!")
+ equals(e.wasClean, true)
+ r.onclose = ->
+ ok(false)
+ r.close()
+
+ u.delay 10, ->
+ start()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git
More information about the Pkg-javascript-commits
mailing list