Bug 1335645 - Part 7 - Fix warning caused by undeclared variables
MozReview-Commit-ID: KYrcvYwVNPB
--- a/netwerk/test/unit/test_chunked_responses.js
+++ b/netwerk/test/unit/test_chunked_responses.js
@@ -1,15 +1,21 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
/*
* Test Chunked-Encoded response parsing.
*/
////////////////////////////////////////////////////////////////////////////////
// Test infrastructure
+"use strict";
+
Cu.import("resource://testing-common/httpd.js");
Cu.import("resource://gre/modules/NetUtil.jsm");
XPCOMUtils.defineLazyGetter(this, "URL", function() {
return "http://localhost:" + httpserver.identity.primaryPort;
});
var httpserver = new HttpServer();
@@ -22,21 +28,21 @@ function run_test()
httpserver.start(-1);
do_test_pending();
run_test_number(1);
}
function run_test_number(num)
{
- testPath = testPathBase + num;
+ var testPath = testPathBase + num;
httpserver.registerPathHandler(testPath, eval("handler" + num));
var channel = setupChannel(testPath);
- flags = test_flags[num]; // OK if flags undefined for test
+ var flags = test_flags[num]; // OK if flags undefined for test
channel.asyncOpen2(new ChannelListener(eval("completeTest" + num),
channel, flags));
}
function setupChannel(url)
{
var chan = NetUtil.newChannel({
uri: URL + url,