X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=test%2FAFB.js;h=c77e5e60056093083902762c3fdeb4e411fb85b6;hb=677813c6a26eca5629ef8201fd0616511400a99e;hp=ae2fd8b8f4a11a6663c316d32197a16d12c3aedb;hpb=94ad734842c1359a012f9850b851063637d3e061;p=src%2Fapp-framework-binder.git 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;