diff --git a/toolkit/mozapps/extensions/test/browser/cancelCompatCheck.sjs b/toolkit/mozapps/extensions/test/browser/cancelCompatCheck.sjs index 51ac38427ca..38bc25d08e2 100644 --- a/toolkit/mozapps/extensions/test/browser/cancelCompatCheck.sjs +++ b/toolkit/mozapps/extensions/test/browser/cancelCompatCheck.sjs @@ -30,14 +30,13 @@ function handleRequest(req, resp) { createInstance(Components.interfaces.nsITimer); timer.init(function sendFile() { dump("cancelCompatCheck: starting to send file\n"); - let (str = {}) { - let read = 0; - do { - // read as much as we can and put it in str.value - read = cstream.readString(0xffffffff, str); - resp.write(str.value); - } while (read != 0); - } + let str = {}; + let read = 0; + do { + // read as much as we can and put it in str.value + read = cstream.readString(0xffffffff, str); + resp.write(str.value); + } while (read != 0); cstream.close(); resp.finish(); }, delay, Components.interfaces.nsITimer.TYPE_ONE_SHOT); diff --git a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js index a56dcbb7f0e..64c0c7b36cc 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js +++ b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js @@ -1575,14 +1575,13 @@ function interpolateAndServeFile(request, response) { fstream.init(file, -1, 0, 0); cstream.init(fstream, "UTF-8", 0, 0); - let (str = {}) { - let read = 0; - do { - // read as much as we can and put it in str.value - read = cstream.readString(0xffffffff, str); - data += str.value; - } while (read != 0); - } + let str = {}; + let read = 0; + do { + // read as much as we can and put it in str.value + read = cstream.readString(0xffffffff, str); + data += str.value; + } while (read != 0); data = data.replace(/%PORT%/g, gPort); response.write(data); @@ -1654,13 +1653,12 @@ function loadFile(aFile) { createInstance(Components.interfaces.nsIConverterInputStream); fstream.init(aFile, -1, 0, 0); cstream.init(fstream, "UTF-8", 0, 0); - let (str = {}) { - let read = 0; - do { - read = cstream.readString(0xffffffff, str); // read as much as we can and put it in str.value - data += str.value; - } while (read != 0); - } + let str = {}; + let read = 0; + do { + read = cstream.readString(0xffffffff, str); // read as much as we can and put it in str.value + data += str.value; + } while (read != 0); cstream.close(); return data; }