[Pkg-javascript-commits] [sockjs-client] 161/434: Add disabled-websocket-test
Tonnerre Lombard
tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:11 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 3f6de258be978519086512f9b8cb17742c1354ae
Author: Marek Majkowski <majek04 at gmail.com>
Date: Thu Sep 29 15:35:42 2011 +0100
Add disabled-websocket-test
---
tests/html/src/tests.coffee | 12 ++++++++++++
tests/sockjs_app.js | 2 ++
2 files changed, 14 insertions(+)
diff --git a/tests/html/src/tests.coffee b/tests/html/src/tests.coffee
index 5c36865..cfcf641 100644
--- a/tests/html/src/tests.coffee
+++ b/tests/html/src/tests.coffee
@@ -410,6 +410,18 @@ asyncTest "chunking test, invalid url port", ->
equal(r, false)
start()
+asyncTest "disabled websocket test", ->
+ expect(2)
+ r = newSockJS('/disabled_websocket_echo', 'websocket')
+ r.onopen = (e) ->
+ fail(true)
+ r.onmessage = (e) ->
+ fail(true)
+ r.onclose = (e) ->
+ equals(e.status, 2000)
+ equals(e.reason, "All transports failed")
+ start()
+
for protocol in protocols
test_protocol_errors(protocol)
diff --git a/tests/sockjs_app.js b/tests/sockjs_app.js
index bfa9c07..a66aa48 100644
--- a/tests/sockjs_app.js
+++ b/tests/sockjs_app.js
@@ -73,6 +73,8 @@ exports.install = function(config, server) {
sjs_echo.installHandlers(server, {prefix:'[/]echo'});
+ sjs_echo.installHandlers(server, {prefix:'[/]disabled_websocket_echo',
+ disabled_transports: ['websocket']});
sjs_close.installHandlers(server, {prefix:'[/]close'});
sjs_ticker.installHandlers(server, {prefix:'[/]ticker'});
sjs_amplify.installHandlers(server, {prefix:'[/]amplify'});
--
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