summaryrefslogtreecommitdiffstats
path: root/test/AFB.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/AFB.js')
-rw-r--r--test/AFB.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/AFB.js b/test/AFB.js
index ae2fd8b8..c77e5e60 100644
--- a/test/AFB.js
+++ b/test/AFB.js
@@ -42,7 +42,13 @@ var AFB_websocket;
var PROTO1 = "x-afb-ws-json1";
AFB_websocket = function(onopen, onabort) {
- this.ws = new WebSocket(urlws, [ PROTO1 ]);
+ var u = urlws;
+ if (AFB_context.token) {
+ u = u + '?x-afb-token=' + AFB_context.token;
+ if (AFB_context.uuid)
+ u = u + '&x-afb-uuid=' + AFB_context.uuid;
+ }
+ this.ws = new WebSocket(u, [ PROTO1 ]);
this.pendings = {};
this.awaitens = {};
this.counter = 0;