summaryrefslogtreecommitdiffstats
path: root/services/sync/tests/unit/test_jpakeclient.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-10-06 06:57:51 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-10-06 06:57:51 +0200
commit0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25 (patch)
treec321601f04cbfd02fb6e12878e745dc49a612c86 /services/sync/tests/unit/test_jpakeclient.js
parent8860eddcee1417483cafd114f3a9ec127e0f1f74 (diff)
downloadUXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar
UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar.gz
UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar.lz
UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar.xz
UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.zip
Import Tycho weave client
Diffstat (limited to 'services/sync/tests/unit/test_jpakeclient.js')
-rw-r--r--services/sync/tests/unit/test_jpakeclient.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/services/sync/tests/unit/test_jpakeclient.js b/services/sync/tests/unit/test_jpakeclient.js
index 783edb460..ff13c5716 100644
--- a/services/sync/tests/unit/test_jpakeclient.js
+++ b/services/sync/tests/unit/test_jpakeclient.js
@@ -38,8 +38,8 @@ function new_channel() {
return cid;
}
-var server;
-var channels = {}; // Map channel -> ServerChannel object
+let server;
+let channels = {}; // Map channel -> ServerChannel object
function server_new_channel(request, response) {
check_headers(request);
let cid = new_channel();
@@ -48,7 +48,7 @@ function server_new_channel(request, response) {
response.bodyOutputStream.write(body, body.length);
}
-var error_report;
+let error_report;
function server_report(request, response) {
check_headers(request);
@@ -68,7 +68,7 @@ function server_report(request, response) {
}
// Hook for test code.
-var hooks = {};
+let hooks = {};
function initHooks() {
hooks.onGET = function onGET(request) {};
}
@@ -146,7 +146,7 @@ ServerChannel.prototype = {
/**
* Controller that throws for everything.
*/
-var BaseController = {
+let BaseController = {
displayPIN: function displayPIN() {
do_throw("displayPIN() shouldn't have been called!");
},
@@ -369,7 +369,7 @@ add_test(function test_wrongPIN() {
displayPIN: function displayPIN(pin) {
this.cid = pin.slice(JPAKE_LENGTH_SECRET);
let secret = pin.slice(0, JPAKE_LENGTH_SECRET);
- secret = Array.prototype.slice.call(secret).reverse().join("");
+ secret = [char for each (char in secret)].reverse().join("");
let new_pin = secret + this.cid;
_("Received PIN " + pin + ", but I'm entering " + new_pin);