Bug 1335645 - Part 7 - Fix warning caused by undeclared variables draft
authorValentin Gosu <valentin.gosu@gmail.com>
Mon, 27 Feb 2017 19:38:10 +0100
changeset 490143 a818c88923efe0576e2fb45c3fb72ee9734dbfd3
parent 490142 407f5d64d2bb30fa38d503104b16fca96ab355e8
child 547181 36f4828ea52d55358ab4e2ace0eac42109d2cc3d
push id47011
push uservalentin.gosu@gmail.com
push dateMon, 27 Feb 2017 18:38:56 +0000
bugs1335645
milestone54.0a1
Bug 1335645 - Part 7 - Fix warning caused by undeclared variables MozReview-Commit-ID: KYrcvYwVNPB
netwerk/test/unit/test_chunked_responses.js
--- 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,