From 072eb34ade3cf36aa96e5bb2a6b880483ee74185 Mon Sep 17 00:00:00 2001 From: Mark Banner Date: Mon, 8 Aug 2022 14:30:34 +0000 Subject: [PATCH] Bug 1783565 - Enable ESLint rule no-redeclare on the rest of netwerk. r=dragana,necko-reviewers Depends on D153896 Differential Revision: https://phabricator.services.mozilla.com/D153897 --- .eslintrc.js | 1 - netwerk/test/unit/head_cache2.js | 12 ++--- netwerk/test/unit/test_MIME_params.js | 4 +- netwerk/test/unit/test_XHR_redirects.js | 4 +- .../unit/test_alt-data_closeWithStatus.js | 5 +- .../test/unit/test_alt-data_cross_process.js | 5 +- netwerk/test/unit/test_alt-data_simple.js | 5 +- netwerk/test/unit/test_bug1683176.js | 8 --- netwerk/test/unit/test_bug337744.js | 4 +- netwerk/test/unit/test_bug396389.js | 4 +- netwerk/test/unit/test_bug504014.js | 4 +- netwerk/test/unit/test_cacheflags.js | 5 +- netwerk/test/unit/test_channel_priority.js | 2 - netwerk/test/unit/test_http2.js | 4 +- netwerk/test/unit/test_http3_coalescing.js | 10 ---- netwerk/test/unit/test_http_headers.js | 4 +- .../test/unit/test_ntlm_proxy_and_web_auth.js | 50 +++++++++++-------- netwerk/test/unit/test_ntlm_proxy_auth.js | 32 +++++++----- netwerk/test/unit/test_ntlm_web_auth.js | 22 ++++---- .../unit/test_original_sent_received_head.js | 5 +- ...artial_response_entry_size_smart_shrink.js | 4 +- netwerk/test/unit/test_permmgr.js | 10 ++-- .../test/unit/test_protocolproxyservice.js | 1 - .../test/unit/test_race_cache_with_network.js | 29 +++++------ netwerk/test/unit/test_range_requests.js | 16 +++--- .../test_rcwn_always_cache_new_content.js | 6 +-- netwerk/test/unit/test_socks.js | 6 +-- netwerk/test/unit/test_standardurl.js | 12 ++--- .../unit/test_suspend_channel_on_authRetry.js | 4 +- .../unit_ipc/test_channel_priority_wrap.js | 1 - 30 files changed, 139 insertions(+), 140 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 93fcf67a34cc..183e8d414445 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -238,7 +238,6 @@ module.exports = { ], rules: { "no-global-assign": "off", - "no-redeclare": "off", "no-shadow": "off", }, }, diff --git a/netwerk/test/unit/head_cache2.js b/netwerk/test/unit/head_cache2.js index 5c3113eccdf8..734fec02775e 100644 --- a/netwerk/test/unit/head_cache2.js +++ b/netwerk/test/unit/head_cache2.js @@ -69,7 +69,7 @@ function pumpReadStream(inputStream, goon) { Ci.nsIInputStreamPump ); pump.init(inputStream, 0, 0, true); - var data = ""; + let data = ""; pump.asyncRead({ onStartRequest(aRequest) {}, onDataAvailable(aRequest, aInputStream, aOffset, aCount) { @@ -89,7 +89,7 @@ function pumpReadStream(inputStream, goon) { }); } else { // blocking stream - var data = read_stream(inputStream, inputStream.available()); + let data = read_stream(inputStream, inputStream.available()); goon(data); } } @@ -187,7 +187,7 @@ OpenCallback.prototype = { return; } - var self = this; + let self = this; executeSoon(function() { // emulate network latency entry.setMetaDataElement("meto", self.workingMetadata); @@ -210,7 +210,7 @@ OpenCallback.prototype = { if (self.behavior & DOOMED) { LOG_C2(self, "checking doom state"); try { - var os = entry.openOutputStream(0, -1); + let os = entry.openOutputStream(0, -1); // Unfortunately, in the undetermined state we cannot even check whether the entry // is actually doomed or not. os.close(); @@ -226,7 +226,7 @@ OpenCallback.prototype = { var offset = self.behavior & PARTIAL ? entry.dataSize : 0; LOG_C2(self, "openOutputStream @ " + offset); - var os = entry.openOutputStream(offset, -1); + let os = entry.openOutputStream(offset, -1); LOG_C2(self, "writing data"); var wrt = os.write(self.workingData, self.workingData.length); Assert.equal(wrt, self.workingData.length); @@ -249,7 +249,7 @@ OpenCallback.prototype = { this.goon(entry, true); } - var self = this; + let self = this; pumpReadStream(entry.openInputStream(0), function(data) { Assert.equal(data, self.workingData); self.onDataCheckPassed = true; diff --git a/netwerk/test/unit/test_MIME_params.js b/netwerk/test/unit/test_MIME_params.js index 786d4fc48f84..ad6c5fae28ff 100644 --- a/netwerk/test/unit/test_MIME_params.js +++ b/netwerk/test/unit/test_MIME_params.js @@ -690,7 +690,7 @@ function do_tests(whichRFC) { tests[i].length == 3 || whichRFC == 0 ? tests[i][1] : tests[i][3]; try { - var result; + let result; if (whichRFC == 0) { result = mhp.getParameter(tests[i][0], "", "UTF-8", true, unused); @@ -715,7 +715,7 @@ function do_tests(whichRFC) { tests[i].length == 3 || whichRFC == 0 ? tests[i][2] : tests[i][4]; try { - var result; + let result; if (whichRFC == 0) { result = mhp.getParameter( diff --git a/netwerk/test/unit/test_XHR_redirects.js b/netwerk/test/unit/test_XHR_redirects.js index dfe037d0ec6d..50fdfce66918 100644 --- a/netwerk/test/unit/test_XHR_redirects.js +++ b/netwerk/test/unit/test_XHR_redirects.js @@ -167,7 +167,7 @@ function run_test() { var xhr; - for (var i = 0; i < tests.length; ++i) { + for (let i = 0; i < tests.length; ++i) { dump("Testing " + tests[i] + "\n"); xhr = createXHR( false, @@ -178,7 +178,7 @@ function run_test() { checkResults(xhr, tests[i][2], tests[i][3], tests[i][4]); } - for (var i = 0; i < othertests.length; ++i) { + for (let i = 0; i < othertests.length; ++i) { dump("Testing " + othertests[i] + " (cross-origin)\n"); xhr = createXHR( false, diff --git a/netwerk/test/unit/test_alt-data_closeWithStatus.js b/netwerk/test/unit/test_alt-data_closeWithStatus.js index 0fd342c2f37a..b0996efd9b2b 100644 --- a/netwerk/test/unit/test_alt-data_closeWithStatus.js +++ b/netwerk/test/unit/test_alt-data_closeWithStatus.js @@ -53,10 +53,11 @@ function contentHandler(metadata, response) { response.setHeader("Cache-Control", "no-cache"); response.setHeader("ETag", "test-etag1"); + let etag; try { - var etag = metadata.getHeader("If-None-Match"); + etag = metadata.getHeader("If-None-Match"); } catch (ex) { - var etag = ""; + etag = ""; } if (etag == "test-etag1" && shouldPassRevalidation) { diff --git a/netwerk/test/unit/test_alt-data_cross_process.js b/netwerk/test/unit/test_alt-data_cross_process.js index 6ec0739bd286..2fb4b3c355f0 100644 --- a/netwerk/test/unit/test_alt-data_cross_process.js +++ b/netwerk/test/unit/test_alt-data_cross_process.js @@ -42,10 +42,11 @@ function contentHandler(metadata, response) { response.setHeader("Cache-Control", "no-cache"); response.setHeader("ETag", "test-etag1"); + let etag; try { - var etag = metadata.getHeader("If-None-Match"); + etag = metadata.getHeader("If-None-Match"); } catch (ex) { - var etag = ""; + etag = ""; } if (etag == "test-etag1" && shouldPassRevalidation) { diff --git a/netwerk/test/unit/test_alt-data_simple.js b/netwerk/test/unit/test_alt-data_simple.js index 17201090e0dd..f5f27e112a1f 100644 --- a/netwerk/test/unit/test_alt-data_simple.js +++ b/netwerk/test/unit/test_alt-data_simple.js @@ -42,10 +42,11 @@ function contentHandler(metadata, response) { response.setHeader("Cache-Control", "no-cache"); response.setHeader("ETag", "test-etag1"); + let etag; try { - var etag = metadata.getHeader("If-None-Match"); + etag = metadata.getHeader("If-None-Match"); } catch (ex) { - var etag = ""; + etag = ""; } if (etag == "test-etag1" && shouldPassRevalidation) { diff --git a/netwerk/test/unit/test_bug1683176.js b/netwerk/test/unit/test_bug1683176.js index 1427db71e42d..fda4366f5dfd 100644 --- a/netwerk/test/unit/test_bug1683176.js +++ b/netwerk/test/unit/test_bug1683176.js @@ -65,14 +65,6 @@ registerCleanupFunction(async () => { await httpserv.stop(); }); -function makeChan(url) { - let chan = NetUtil.newChannel({ - uri: url, - loadUsingSystemPrincipal: true, - }).QueryInterface(Ci.nsIHttpChannel); - return chan; -} - function channelOpenPromise(chan) { return new Promise(resolve => { let topic = "http-on-transaction-suspended-authentication"; diff --git a/netwerk/test/unit/test_bug337744.js b/netwerk/test/unit/test_bug337744.js index 583627f270b5..69a99b8765b2 100644 --- a/netwerk/test/unit/test_bug337744.js +++ b/netwerk/test/unit/test_bug337744.js @@ -110,7 +110,7 @@ function run_test() { let baseRoot = resProto.resolveURI(Services.io.newURI("resource:///")); let greRoot = resProto.resolveURI(Services.io.newURI("resource://gre/")); - for (var spec of specs) { + for (let spec of specs) { check_safe_resolution(spec, rootURI.spec); check_safe_resolution( spec.replace("res-test", "res-inexistent"), @@ -120,7 +120,7 @@ function run_test() { check_safe_resolution(spec.replace("res-test", "gre"), greRoot); } - for (var spec of error_specs) { + for (let spec of error_specs) { check_resolution_error(spec); } } diff --git a/netwerk/test/unit/test_bug396389.js b/netwerk/test/unit/test_bug396389.js index 90323844a516..b0202028f698 100644 --- a/netwerk/test/unit/test_bug396389.js +++ b/netwerk/test/unit/test_bug396389.js @@ -42,7 +42,7 @@ function run_test() { // Make sure our prefs are set such that this test actually means something var prefs = Services.prefs; - for (var pref of prefData) { + for (let pref of prefData) { prefs.setBoolPref(pref.name, pref.newVal); } @@ -58,7 +58,7 @@ function run_test() { Assert.equal(uri4.displayHost, uri5.displayHost); Assert.equal(uri4.asciiHost, uri5.asciiHost); } finally { - for (var pref of prefData) { + for (let pref of prefData) { if (prefs.prefHasUserValue(pref.name)) { prefs.clearUserPref(pref.name); } diff --git a/netwerk/test/unit/test_bug504014.js b/netwerk/test/unit/test_bug504014.js index 1d5bd37bcc99..f7e2ed24529d 100644 --- a/netwerk/test/unit/test_bug504014.js +++ b/netwerk/test/unit/test_bug504014.js @@ -53,7 +53,7 @@ var invalid_URIs = [ ]; function run_test() { - for (var i = 0; i < valid_URIs.length; i++) { + for (let i = 0; i < valid_URIs.length; i++) { try { Services.io.newURI(valid_URIs[i]); } catch (e) { @@ -61,7 +61,7 @@ function run_test() { } } - for (var i = 0; i < invalid_URIs.length; i++) { + for (let i = 0; i < invalid_URIs.length; i++) { try { Services.io.newURI(invalid_URIs[i]); do_throw("should throw: " + invalid_URIs[i]); diff --git a/netwerk/test/unit/test_cacheflags.js b/netwerk/test/unit/test_cacheflags.js index 33d47d9ea15a..412595816b52 100644 --- a/netwerk/test/unit/test_cacheflags.js +++ b/netwerk/test/unit/test_cacheflags.js @@ -370,10 +370,11 @@ function run_next_test() { function handler(httpStatus, metadata, response) { gHitServer = true; + let etag; try { - var etag = metadata.getHeader("If-None-Match"); + etag = metadata.getHeader("If-None-Match"); } catch (ex) { - var etag = ""; + etag = ""; } if (etag == "testtag") { // Allow using the cached data diff --git a/netwerk/test/unit/test_channel_priority.js b/netwerk/test/unit/test_channel_priority.js index 2a757de90af2..6f2aedda6e48 100644 --- a/netwerk/test/unit/test_channel_priority.js +++ b/netwerk/test/unit/test_channel_priority.js @@ -4,8 +4,6 @@ "use strict"; -/* globals NetUtil*/ -/* globals HttpServer */ const { HttpServer } = ChromeUtils.import("resource://testing-common/httpd.js"); let httpserver; diff --git a/netwerk/test/unit/test_http2.js b/netwerk/test/unit/test_http2.js index 411a121ec581..49cfcd275d1a 100644 --- a/netwerk/test/unit/test_http2.js +++ b/netwerk/test/unit/test_http2.js @@ -724,7 +724,7 @@ var altsvcClientListener = { ); if (!isHttp2Connection) { dump("/altsvc1 not over h2 yet - retry\n"); - var chan = makeChan( + let chan = makeChan( "http://foo.example.com:" + httpserv.identity.primaryPort + "/altsvc1" ).QueryInterface(Ci.nsIHttpChannel); // we use this header to tell the server to issue a altsvc frame for the @@ -738,7 +738,7 @@ var altsvcClientListener = { chan.asyncOpen(altsvcClientListener); } else { Assert.ok(isHttp2Connection); - var chan = makeChan( + let chan = makeChan( "http://foo.example.com:" + httpserv2.identity.primaryPort + "/altsvc2" ).QueryInterface(Ci.nsIHttpChannel); chan.loadFlags = Ci.nsIRequest.LOAD_BYPASS_CACHE; diff --git a/netwerk/test/unit/test_http3_coalescing.js b/netwerk/test/unit/test_http3_coalescing.js index efd44a6cf844..45934dd53573 100644 --- a/netwerk/test/unit/test_http3_coalescing.js +++ b/netwerk/test/unit/test_http3_coalescing.js @@ -63,16 +63,6 @@ function makeChan(url) { return chan; } -function makeChan(url) { - let chan = NetUtil.newChannel({ - uri: url, - loadUsingSystemPrincipal: true, - contentPolicyType: Ci.nsIContentPolicy.TYPE_DOCUMENT, - }).QueryInterface(Ci.nsIHttpChannel); - chan.loadFlags = Ci.nsIChannel.LOAD_INITIAL_DOCUMENT_URI; - return chan; -} - function channelOpenPromise(chan, flags) { return new Promise(resolve => { function finish(req, buffer) { diff --git a/netwerk/test/unit/test_http_headers.js b/netwerk/test/unit/test_http_headers.js index e87d4cc2bbb4..b43cebea1fd4 100644 --- a/netwerk/test/unit/test_http_headers.js +++ b/netwerk/test/unit/test_http_headers.js @@ -25,11 +25,11 @@ function run_test() { chan.setRequestHeader("foopy", "baz", true); check_request_header(chan, "foopy", "bar, baz"); - for (var i = 0; i < 100; ++i) { + for (let i = 0; i < 100; ++i) { chan.setRequestHeader("foopy" + i, i, false); } - for (var i = 0; i < 100; ++i) { + for (let i = 0; i < 100; ++i) { check_request_header(chan, "foopy" + i, i); } diff --git a/netwerk/test/unit/test_ntlm_proxy_and_web_auth.js b/netwerk/test/unit/test_ntlm_proxy_and_web_auth.js index 49bff0f027f5..c8a65a86ad2f 100644 --- a/netwerk/test/unit/test_ntlm_proxy_and_web_auth.js +++ b/netwerk/test/unit/test_ntlm_proxy_and_web_auth.js @@ -119,6 +119,8 @@ const PROXY_CHALLENGE = // i.e. successful proxy auth and successful web server auth // function authHandler(metadata, response) { + let authorization; + let authPrefix; switch (requestsMade) { case 0: // Proxy - First request to the Proxy resppond with a 407 to start auth @@ -127,8 +129,8 @@ function authHandler(metadata, response) { break; case 1: // Proxy - Expecting a type 1 negotiate message from the client - var authorization = metadata.getHeader("Proxy-Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Proxy-Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE1_PREFIX, authPrefix, "Expecting a Type 1 message"); response.setStatusLine(metadata.httpVersion, 407, "Unauthorized"); response.setHeader("Proxy-Authenticate", PROXY_CHALLENGE, false); @@ -136,31 +138,31 @@ function authHandler(metadata, response) { case 2: // Proxy - Expecting a type 3 Authenticate message from the client // Will respond with a 401 to start web server auth sequence - var authorization = metadata.getHeader("Proxy-Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Proxy-Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE3_PREFIX, authPrefix, "Expecting a Type 3 message"); response.setStatusLine(metadata.httpVersion, 401, "Unauthorized"); response.setHeader("WWW-Authenticate", "NTLM", false); break; case 3: // Web Server - Expecting a type 1 negotiate message from the client - var authorization = metadata.getHeader("Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE1_PREFIX, authPrefix, "Expecting a Type 1 message"); response.setStatusLine(metadata.httpVersion, 401, "Unauthorized"); response.setHeader("WWW-Authenticate", NTLM_CHALLENGE, false); break; case 4: // Web Server - Expecting a type 3 Authenticate message from the client - var authorization = metadata.getHeader("Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE3_PREFIX, authPrefix, "Expecting a Type 3 message"); response.setStatusLine(metadata.httpVersion, 200, "Successful"); break; default: // We should be authenticated and further requests are permitted - var authorization = metadata.getHeader("Authorization"); - var authorization = metadata.getHeader("Proxy-Authorization"); + authorization = metadata.getHeader("Authorization"); + authorization = metadata.getHeader("Proxy-Authorization"); Assert.isnull(authorization); response.setStatusLine(metadata.httpVersion, 200, "Successful"); } @@ -172,6 +174,8 @@ function authHandler(metadata, response) { // proxy auth fails. // function authHandlerInvalidProxyPassword(metadata, response) { + let authorization; + let authPrefix; switch (requestsMade) { case 0: // Proxy - First request respond with a 407 to initiate auth sequence @@ -180,8 +184,8 @@ function authHandlerInvalidProxyPassword(metadata, response) { break; case 1: // Proxy - Expecting a type 1 negotiate message from the client - var authorization = metadata.getHeader("Proxy-Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Proxy-Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE1_PREFIX, authPrefix, "Expecting a Type 1 message"); response.setStatusLine(metadata.httpVersion, 407, "Unauthorized"); response.setHeader("Proxy-Authenticate", PROXY_CHALLENGE, false); @@ -190,8 +194,8 @@ function authHandlerInvalidProxyPassword(metadata, response) { // Proxy - Expecting a type 3 Authenticate message from the client // Respond with a 407 to indicate invalid credentials // - var authorization = metadata.getHeader("Proxy-Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Proxy-Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE3_PREFIX, authPrefix, "Expecting a Type 3 message"); response.setStatusLine(metadata.httpVersion, 407, "Unauthorized"); response.setHeader("Proxy-Authenticate", "NTLM", false); @@ -211,6 +215,8 @@ function authHandlerInvalidProxyPassword(metadata, response) { // Note: the connection should not be reused once the password failure is // detected function authHandlerInvalidWebPassword(metadata, response) { + let authorization; + let authPrefix; switch (requestsMade) { case 0: // Proxy - First request return a 407 to start Proxy auth @@ -219,8 +225,8 @@ function authHandlerInvalidWebPassword(metadata, response) { break; case 1: // Proxy - Expecting a type 1 negotiate message from the client - var authorization = metadata.getHeader("Proxy-Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Proxy-Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE1_PREFIX, authPrefix, "Expecting a Type 1 message"); response.setStatusLine(metadata.httpVersion, 407, "Unauthorized"); response.setHeader("Proxy-Authenticate", NTLM_CHALLENGE, false); @@ -228,16 +234,16 @@ function authHandlerInvalidWebPassword(metadata, response) { case 2: // Proxy - Expecting a type 3 Authenticate message from the client // Responds with a 401 to start web server auth - var authorization = metadata.getHeader("Proxy-Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Proxy-Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE3_PREFIX, authPrefix, "Expecting a Type 3 message"); response.setStatusLine(metadata.httpVersion, 401, "Unauthorized"); response.setHeader("WWW-Authenticate", "NTLM", false); break; case 3: // Web Server - Expecting a type 1 negotiate message from the client - var authorization = metadata.getHeader("Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE1_PREFIX, authPrefix, "Expecting a Type 1 message"); response.setStatusLine(metadata.httpVersion, 401, "Unauthorized"); response.setHeader("WWW-Authenticate", NTLM_CHALLENGE, false); @@ -245,8 +251,8 @@ function authHandlerInvalidWebPassword(metadata, response) { case 4: // Web Server - Expecting a type 3 Authenticate message from the client // Respond with a 401 to restart the auth sequence. - var authorization = metadata.getHeader("Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE3_PREFIX, authPrefix, "Expecting a Type 1 message"); response.setStatusLine(metadata.httpVersion, 401, "Unauthorized"); break; diff --git a/netwerk/test/unit/test_ntlm_proxy_auth.js b/netwerk/test/unit/test_ntlm_proxy_auth.js index 967d4589c190..c3132f9c220c 100644 --- a/netwerk/test/unit/test_ntlm_proxy_auth.js +++ b/netwerk/test/unit/test_ntlm_proxy_auth.js @@ -121,6 +121,8 @@ const PROXY_CHALLENGE = // i.e. successful proxy auth // function successfulAuth(metadata, response) { + let authorization; + let authPrefix; switch (requestsMade) { case 0: // Proxy - First request to the Proxy resppond with a 407 to start auth @@ -129,8 +131,8 @@ function successfulAuth(metadata, response) { break; case 1: // Proxy - Expecting a type 1 negotiate message from the client - var authorization = metadata.getHeader("Proxy-Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Proxy-Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE1_PREFIX, authPrefix, "Expecting a Type 1 message"); response.setStatusLine(metadata.httpVersion, 407, "Unauthorized"); response.setHeader("Proxy-Authenticate", PROXY_CHALLENGE, false); @@ -138,14 +140,14 @@ function successfulAuth(metadata, response) { case 2: // Proxy - Expecting a type 3 Authenticate message from the client // Will respond with a 401 to start web server auth sequence - var authorization = metadata.getHeader("Proxy-Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Proxy-Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE3_PREFIX, authPrefix, "Expecting a Type 3 message"); response.setStatusLine(metadata.httpVersion, 200, "Successful"); break; default: // We should be authenticated and further requests are permitted - var authorization = metadata.getHeader("Proxy-Authorization"); + authorization = metadata.getHeader("Proxy-Authorization"); Assert.isnull(authorization); response.setStatusLine(metadata.httpVersion, 200, "Successful"); } @@ -157,6 +159,8 @@ function successfulAuth(metadata, response) { // proxy auth fails. // function failedAuth(metadata, response) { + let authorization; + let authPrefix; switch (requestsMade) { case 0: // Proxy - First request respond with a 407 to initiate auth sequence @@ -165,8 +169,8 @@ function failedAuth(metadata, response) { break; case 1: // Proxy - Expecting a type 1 negotiate message from the client - var authorization = metadata.getHeader("Proxy-Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Proxy-Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE1_PREFIX, authPrefix, "Expecting a Type 1 message"); response.setStatusLine(metadata.httpVersion, 407, "Unauthorized"); response.setHeader("Proxy-Authenticate", PROXY_CHALLENGE, false); @@ -175,8 +179,8 @@ function failedAuth(metadata, response) { // Proxy - Expecting a type 3 Authenticate message from the client // Respond with a 407 to indicate invalid credentials // - var authorization = metadata.getHeader("Proxy-Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Proxy-Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE3_PREFIX, authPrefix, "Expecting a Type 3 message"); response.setStatusLine(metadata.httpVersion, 407, "Unauthorized"); response.setHeader("Proxy-Authenticate", "NTLM", false); @@ -195,6 +199,8 @@ function failedAuth(metadata, response) { // Detects bug 486508 // function connectionReset(metadata, response) { + let authorization; + let authPrefix; switch (requestsMade) { case 0: // Proxy - First request to the Proxy resppond with a 407 to start auth @@ -203,16 +209,16 @@ function connectionReset(metadata, response) { break; case 1: // Proxy - Expecting a type 1 negotiate message from the client - var authorization = metadata.getHeader("Proxy-Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Proxy-Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE1_PREFIX, authPrefix, "Expecting a Type 1 message"); ntlmTypeOneCount++; response.setStatusLine(metadata.httpVersion, 407, "Unauthorized"); response.setHeader("Proxy-Authenticate", PROXY_CHALLENGE, false); break; case 2: - var authorization = metadata.getHeader("Proxy-Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Proxy-Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE3_PREFIX, authPrefix, "Expecting a Type 3 message"); ntlmTypeTwoCount++; response.seizePower(); diff --git a/netwerk/test/unit/test_ntlm_web_auth.js b/netwerk/test/unit/test_ntlm_web_auth.js index 30ea5c29eb87..91176b2ecfb1 100644 --- a/netwerk/test/unit/test_ntlm_web_auth.js +++ b/netwerk/test/unit/test_ntlm_web_auth.js @@ -117,6 +117,8 @@ const NTLM_CHALLENGE = // i.e. successful web server auth // function successfulAuth(metadata, response) { + let authorization; + let authPrefix; switch (requestsMade) { case 0: // Web Server - Initial request @@ -126,22 +128,22 @@ function successfulAuth(metadata, response) { break; case 1: // Web Server - Expecting a type 1 negotiate message from the client - var authorization = metadata.getHeader("Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE1_PREFIX, authPrefix, "Expecting a Type 1 message"); response.setStatusLine(metadata.httpVersion, 401, "Unauthorized"); response.setHeader("WWW-Authenticate", NTLM_CHALLENGE, false); break; case 2: // Web Server - Expecting a type 3 Authenticate message from the client - var authorization = metadata.getHeader("Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE3_PREFIX, authPrefix, "Expecting a Type 3 message"); response.setStatusLine(metadata.httpVersion, 200, "Successful"); break; default: // We should be authenticated and further requests are permitted - var authorization = metadata.getHeader("Authorization"); + authorization = metadata.getHeader("Authorization"); Assert.isnull(authorization); response.setStatusLine(metadata.httpVersion, 200, "Successful"); } @@ -150,6 +152,8 @@ function successfulAuth(metadata, response) { // web server responses simulating an unsuccessful web server auth function failedAuth(metadata, response) { + let authorization; + let authPrefix; switch (requestsMade) { case 0: // Web Server - First request return a 401 to start auth sequence @@ -158,8 +162,8 @@ function failedAuth(metadata, response) { break; case 1: // Web Server - Expecting a type 1 negotiate message from the client - var authorization = metadata.getHeader("Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE1_PREFIX, authPrefix, "Expecting a Type 1 message"); response.setStatusLine(metadata.httpVersion, 401, "Unauthorized"); response.setHeader("WWW-Authenticate", NTLM_CHALLENGE, false); @@ -167,8 +171,8 @@ function failedAuth(metadata, response) { case 2: // Web Server - Expecting a type 3 Authenticate message from the client // Respond with a 401 to restart the auth sequence. - var authorization = metadata.getHeader("Authorization"); - var authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); + authorization = metadata.getHeader("Authorization"); + authPrefix = authorization.substring(0, NTLM_PREFIX_LEN); Assert.equal(NTLM_TYPE3_PREFIX, authPrefix, "Expecting a Type 1 message"); response.setStatusLine(metadata.httpVersion, 401, "Unauthorized"); break; diff --git a/netwerk/test/unit/test_original_sent_received_head.js b/netwerk/test/unit/test_original_sent_received_head.js index f2851c725b04..f4bcf427525a 100644 --- a/netwerk/test/unit/test_original_sent_received_head.js +++ b/netwerk/test/unit/test_original_sent_received_head.js @@ -90,10 +90,11 @@ function serverHandler(metadata, response) { print("============== serverHandler: in"); } + let etag; try { - var etag = metadata.getHeader("If-None-Match"); + etag = metadata.getHeader("If-None-Match"); } catch (ex) { - var etag = ""; + etag = ""; } if (etag == "testtag") { if (dbg) { diff --git a/netwerk/test/unit/test_partial_response_entry_size_smart_shrink.js b/netwerk/test/unit/test_partial_response_entry_size_smart_shrink.js index bbef41218fe9..3a6875c63cda 100644 --- a/netwerk/test/unit/test_partial_response_entry_size_smart_shrink.js +++ b/netwerk/test/unit/test_partial_response_entry_size_smart_shrink.js @@ -36,11 +36,11 @@ function contentHandler(metadata, response) { if (!metadata.hasHeader("If-Range")) { response.setHeader("Content-Length", responseBody.length + ""); response.processAsync(); - var slice = responseBody.slice(0, 100); + let slice = responseBody.slice(0, 100); response.bodyOutputStream.write(slice, slice.length); response.finish(); } else { - var slice = responseBody.slice(100); + let slice = responseBody.slice(100); response.setStatusLine(metadata.httpVersion, 206, "Partial Content"); response.setHeader( "Content-Range", diff --git a/netwerk/test/unit/test_permmgr.js b/netwerk/test/unit/test_permmgr.js index 143f81564673..5d10429d5890 100644 --- a/netwerk/test/unit/test_permmgr.js +++ b/netwerk/test/unit/test_permmgr.js @@ -45,7 +45,7 @@ function run_test() { } // put a few hosts in - for (var i = 0; i < hosts.length; ++i) { + for (let i = 0; i < hosts.length; ++i) { let uri = ioService.newURI(hosts[i][0]); let principal = secMan.createContentPrincipal(uri, {}); @@ -53,7 +53,7 @@ function run_test() { } // test the result - for (var i = 0; i < results.length; ++i) { + for (let i = 0; i < results.length; ++i) { let uri = ioService.newURI(results[i][0]); let principal = secMan.createContentPrincipal(uri, {}); @@ -72,13 +72,13 @@ function run_test() { Assert.equal(perms.length, hosts.length); // ... remove all the hosts ... - for (var j = 0; j < perms.length; ++j) { + for (let j = 0; j < perms.length; ++j) { pm.removePermission(perms[j]); } // ... ensure each and every element is equal ... - for (var i = 0; i < hosts.length; ++i) { - for (var j = 0; j < perms.length; ++j) { + for (let i = 0; i < hosts.length; ++i) { + for (let j = 0; j < perms.length; ++j) { if ( perms[j].matchesURI(ioService.newURI(hosts[i][0]), true) && hosts[i][1] == perms[j].type && diff --git a/netwerk/test/unit/test_protocolproxyservice.js b/netwerk/test/unit/test_protocolproxyservice.js index 647e04b02e5b..adea9dd627a6 100644 --- a/netwerk/test/unit/test_protocolproxyservice.js +++ b/netwerk/test/unit/test_protocolproxyservice.js @@ -752,7 +752,6 @@ function host_filter_cb(proxy) { // Verify that hists in the host filter list are not proxied // refers to "network.proxy.no_proxies_on" -var uriStrUseProxyList; var uriStrUseProxyList; var hostFilterList; var uriStrFilterList; diff --git a/netwerk/test/unit/test_race_cache_with_network.js b/netwerk/test/unit/test_race_cache_with_network.js index 9944988ddadb..4c25fd12efca 100644 --- a/netwerk/test/unit/test_race_cache_with_network.js +++ b/netwerk/test/unit/test_race_cache_with_network.js @@ -25,10 +25,11 @@ function test_handler(metadata, response) { response.setHeader("Cache-Control", "no-cache"); response.setHeader("ETag", "test-etag1"); + let etag; try { - var etag = metadata.getHeader("If-None-Match"); + etag = metadata.getHeader("If-None-Match"); } catch (ex) { - var etag = ""; + etag = ""; } if (etag == "test-etag1") { @@ -105,7 +106,7 @@ function* testSteps() { }); // Initial request. Stores the response in the cache. - var channel = make_channel("http://localhost:" + PORT + "/rcwn"); + let channel = make_channel("http://localhost:" + PORT + "/rcwn"); channel.asyncOpen(new ChannelListener(checkContent, null)); yield undefined; equal(gResponseCounter, 1); @@ -113,7 +114,7 @@ function* testSteps() { equal(g304Counter, 0, "check number of 304 responses"); // Checks that response is returned from the cache, after a 304 response. - var channel = make_channel("http://localhost:" + PORT + "/rcwn"); + channel = make_channel("http://localhost:" + PORT + "/rcwn"); channel.asyncOpen(new ChannelListener(checkContent, null)); yield undefined; equal(gResponseCounter, 2); @@ -121,7 +122,7 @@ function* testSteps() { equal(g304Counter, 1, "check number of 304 responses"); // Checks that delaying the response from the cache works. - var channel = make_channel("http://localhost:" + PORT + "/rcwn"); + channel = make_channel("http://localhost:" + PORT + "/rcwn"); channel .QueryInterface(Ci.nsIRaceCacheWithNetwork) .test_delayCacheEntryOpeningBy(200); @@ -138,7 +139,7 @@ function* testSteps() { equal(g304Counter, 2, "check number of 304 responses"); // Checks that we can trigger the cache open immediately, even if the cache delay is set very high. - var channel = make_channel("http://localhost:" + PORT + "/rcwn"); + channel = make_channel("http://localhost:" + PORT + "/rcwn"); channel .QueryInterface(Ci.nsIRaceCacheWithNetwork) .test_delayCacheEntryOpeningBy(100000); @@ -154,7 +155,7 @@ function* testSteps() { equal(g304Counter, 3, "check number of 304 responses"); // Sets a high delay for the cache fetch, and triggers the network activity. - var channel = make_channel("http://localhost:" + PORT + "/rcwn"); + channel = make_channel("http://localhost:" + PORT + "/rcwn"); channel .QueryInterface(Ci.nsIRaceCacheWithNetwork) .test_delayCacheEntryOpeningBy(100000); @@ -169,7 +170,7 @@ function* testSteps() { // Sets a high delay for the cache fetch, and triggers the network activity. // While the network response is produced, we trigger the cache fetch. // Because the network response was the first, a non-conditional request is sent. - var channel = make_channel("http://localhost:" + PORT + "/rcwn"); + channel = make_channel("http://localhost:" + PORT + "/rcwn"); channel .QueryInterface(Ci.nsIRaceCacheWithNetwork) .test_delayCacheEntryOpeningBy(100000); @@ -188,7 +189,7 @@ function* testSteps() { equal(g304Counter, 3, "check number of 304 responses"); // Triggers cache open before triggering network. - var channel = make_channel("http://localhost:" + PORT + "/rcwn"); + channel = make_channel("http://localhost:" + PORT + "/rcwn"); channel .QueryInterface(Ci.nsIRaceCacheWithNetwork) .test_delayCacheEntryOpeningBy(100000); @@ -205,7 +206,7 @@ function* testSteps() { equal(g304Counter, 4, "check number of 304 responses"); // Load the cached handler so we don't need to revalidate - var channel = make_channel("http://localhost:" + PORT + "/rcwn_cached"); + channel = make_channel("http://localhost:" + PORT + "/rcwn_cached"); channel.asyncOpen(new ChannelListener(checkContent, null)); yield undefined; equal(gResponseCounter, 8); @@ -213,7 +214,7 @@ function* testSteps() { equal(g304Counter, 4, "check number of 304 responses"); // Make sure response is loaded from the cache, not the network - var channel = make_channel("http://localhost:" + PORT + "/rcwn_cached"); + channel = make_channel("http://localhost:" + PORT + "/rcwn_cached"); channel.asyncOpen(new ChannelListener(checkContent, null)); yield undefined; equal(gResponseCounter, 9); @@ -222,7 +223,7 @@ function* testSteps() { // Cache times out, so we trigger the network gIsFromCache = 0; - var channel = make_channel("http://localhost:" + PORT + "/rcwn_cached"); + channel = make_channel("http://localhost:" + PORT + "/rcwn_cached"); channel .QueryInterface(Ci.nsIRaceCacheWithNetwork) .test_delayCacheEntryOpeningBy(100000); @@ -236,7 +237,7 @@ function* testSteps() { equal(g304Counter, 4, "check number of 304 responses"); // Cache callback comes back right after network is triggered. - var channel = make_channel("http://localhost:" + PORT + "/rcwn_cached"); + channel = make_channel("http://localhost:" + PORT + "/rcwn_cached"); channel .QueryInterface(Ci.nsIRaceCacheWithNetwork) .test_delayCacheEntryOpeningBy(100000); @@ -258,7 +259,7 @@ function* testSteps() { // and some we will get from the cache. gIsFromCache = 0; for (var i = 0; i < 50; i++) { - var channel = make_channel("http://localhost:" + PORT + "/rcwn_cached"); + channel = make_channel("http://localhost:" + PORT + "/rcwn_cached"); channel .QueryInterface(Ci.nsIRaceCacheWithNetwork) .test_delayCacheEntryOpeningBy(100000); diff --git a/netwerk/test/unit/test_range_requests.js b/netwerk/test/unit/test_range_requests.js index a6c50287c0d8..f204dd4791b2 100644 --- a/netwerk/test/unit/test_range_requests.js +++ b/netwerk/test/unit/test_range_requests.js @@ -492,35 +492,35 @@ function run_test() { evict_cache_entries(); // Case 2: zero-length partial entry must not trigger range-request - var chan = make_channel("http://localhost:" + port + "/test_2"); + let chan = make_channel("http://localhost:" + port + "/test_2"); chan.asyncOpen(new Canceler(received_partial_2)); // Case 3: no-store response must not trigger range-request - var chan = make_channel("http://localhost:" + port + "/test_3"); + chan = make_channel("http://localhost:" + port + "/test_3"); chan.asyncOpen(new MyListener(received_partial_3)); // Case 4: response with content-encoding must not trigger range-request - var chan = make_channel("http://localhost:" + port + "/test_4"); + chan = make_channel("http://localhost:" + port + "/test_4"); chan.asyncOpen(new MyListener(received_partial_4)); // Case 5: conditional request-header set by client - var chan = make_channel("http://localhost:" + port + "/test_5"); + chan = make_channel("http://localhost:" + port + "/test_5"); chan.asyncOpen(new MyListener(received_partial_5)); // Case 6: response is not resumable (drop the Accept-Ranges header) - var chan = make_channel("http://localhost:" + port + "/test_6"); + chan = make_channel("http://localhost:" + port + "/test_6"); chan.asyncOpen(new MyListener(received_partial_6)); // Case 7: a basic positive test - var chan = make_channel("http://localhost:" + port + "/test_7"); + chan = make_channel("http://localhost:" + port + "/test_7"); chan.asyncOpen(new MyListener(received_partial_7)); // Case 8: check that mismatched 206 and 200 sizes throw error - var chan = make_channel("http://localhost:" + port + "/test_8"); + chan = make_channel("http://localhost:" + port + "/test_8"); chan.asyncOpen(new MyListener(received_partial_8)); // Case 9: check that weak etag is not used for a range request - var chan = make_channel("http://localhost:" + port + "/test_9"); + chan = make_channel("http://localhost:" + port + "/test_9"); chan.asyncOpen(new MyListener(received_partial_9)); do_test_pending(); diff --git a/netwerk/test/unit/test_rcwn_always_cache_new_content.js b/netwerk/test/unit/test_rcwn_always_cache_new_content.js index b8cc069126f5..e9307bc8cc0d 100644 --- a/netwerk/test/unit/test_rcwn_always_cache_new_content.js +++ b/netwerk/test/unit/test_rcwn_always_cache_new_content.js @@ -87,14 +87,14 @@ function run_test() { let testGenerator = testSteps(); function* testSteps() { // Store first version of the content in the cache. - var channel = make_channel("http://localhost:" + PORT + "/rcwn"); + let channel = make_channel("http://localhost:" + PORT + "/rcwn"); channel.asyncOpen(new ChannelListener(checkContent, null)); yield undefined; equal(gRequestCounter, 1); // Simulate the network victory by setting high delay for the cache fetch and // triggering the network. - var channel = make_channel("http://localhost:" + PORT + "/rcwn"); + channel = make_channel("http://localhost:" + PORT + "/rcwn"); channel .QueryInterface(Ci.nsIRaceCacheWithNetwork) .test_delayCacheEntryOpeningBy(100000); @@ -105,7 +105,7 @@ function* testSteps() { equal(gRequestCounter, 2); // Simulate navigation back by specifying VALIDATE_NEVER flag. - var channel = make_channel("http://localhost:" + PORT + "/rcwn"); + channel = make_channel("http://localhost:" + PORT + "/rcwn"); channel.loadFlags = Ci.nsIRequest.VALIDATE_NEVER; channel.asyncOpen(new ChannelListener(checkContent, null)); yield undefined; diff --git a/netwerk/test/unit/test_socks.js b/netwerk/test/unit/test_socks.js index 44dc58184bfa..0abf324fce07 100644 --- a/netwerk/test/unit/test_socks.js +++ b/netwerk/test/unit/test_socks.js @@ -41,11 +41,11 @@ function runScriptSubprocess(script, args) { do_throw("Can't find xpcshell binary"); } - var script = do_get_file(script); + var file = do_get_file(script); var proc = new Process(bin); - var args = [script.path].concat(args); + var procArgs = [file.path].concat(args); - proc.run(false, args, args.length); + proc.run(false, procArgs, procArgs.length); return proc; } diff --git a/netwerk/test/unit/test_standardurl.js b/netwerk/test/unit/test_standardurl.js index 26d7212d08b1..c04c0854188f 100644 --- a/netwerk/test/unit/test_standardurl.js +++ b/netwerk/test/unit/test_standardurl.js @@ -604,7 +604,7 @@ add_test(function test_hugeStringThrows() { }); add_test(function test_filterWhitespace() { - var url = stringToURL( + let url = stringToURL( " \r\n\th\nt\rt\tp://ex\r\n\tample.com/path\r\n\t/\r\n\tto the/fil\r\n\te.e\r\n\txt?que\r\n\try#ha\r\n\tsh \r\n\t " ); Assert.equal( @@ -613,7 +613,7 @@ add_test(function test_filterWhitespace() { ); // These setters should escape \r\n\t, not filter them. - var url = stringToURL("http://test.com/path?query#hash"); + url = stringToURL("http://test.com/path?query#hash"); url = url .mutate() .setFilePath("pa\r\n\tth") @@ -722,7 +722,7 @@ add_test(function test_encode_C0_and_space() { ) { continue; } - var url = stringToURL( + let url = stringToURL( "http://example.com/pa" + String.fromCharCode(i) + "th?qu" + @@ -744,7 +744,7 @@ add_test(function test_encode_C0_and_space() { } // Additionally, we need to check the setters. - var url = stringToURL("http://example.com/path?query#hash"); + let url = stringToURL("http://example.com/path?query#hash"); url = url .mutate() .setFilePath("pa\0th") @@ -790,7 +790,7 @@ add_test(function test_ipv4Normalize() { "http://127.0.0.1.", ].map(stringToURL); - var url; + let url; for (url of localIPv4s) { Assert.equal(url.spec, "http://127.0.0.1/"); } @@ -821,7 +821,7 @@ add_test(function test_ipv4Normalize() { Assert.equal(url.spec, spec); } - var url = stringToURL("resource://path/to/resource/"); + url = stringToURL("resource://path/to/resource/"); url = url .mutate() .setHost("123") diff --git a/netwerk/test/unit/test_suspend_channel_on_authRetry.js b/netwerk/test/unit/test_suspend_channel_on_authRetry.js index f1f6d7db756b..f2c352e50cd4 100644 --- a/netwerk/test/unit/test_suspend_channel_on_authRetry.js +++ b/netwerk/test/unit/test_suspend_channel_on_authRetry.js @@ -74,7 +74,7 @@ requestListenerObserver.prototype = { subject instanceof Ci.nsIHttpChannel ) { if (this.suspendOnBeforeConnect) { - var chan = subject.QueryInterface(Ci.nsIHttpChannel); + let chan = subject.QueryInterface(Ci.nsIHttpChannel); executeSoon(() => { this.resumeOnBeforeConnect = true; chan.resume(); @@ -87,7 +87,7 @@ requestListenerObserver.prototype = { subject instanceof Ci.nsIHttpChannel ) { if (this.suspendOnModifyRequest) { - var chan = subject.QueryInterface(Ci.nsIHttpChannel); + let chan = subject.QueryInterface(Ci.nsIHttpChannel); executeSoon(() => { this.resumeOnModifyRequest = true; chan.resume(); diff --git a/netwerk/test/unit_ipc/test_channel_priority_wrap.js b/netwerk/test/unit_ipc/test_channel_priority_wrap.js index 2bcac3b82769..c443d221d00b 100644 --- a/netwerk/test/unit_ipc/test_channel_priority_wrap.js +++ b/netwerk/test/unit_ipc/test_channel_priority_wrap.js @@ -4,7 +4,6 @@ "use strict"; -/* globals HttpServer */ const { HttpServer } = ChromeUtils.import("resource://testing-common/httpd.js"); let httpserver;