mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1783565 - Enable ESLint rule no-global-assign for the rest of netwerk. r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D153898
This commit is contained in:
parent
58f94b3835
commit
4c8877a5d0
@ -237,7 +237,6 @@ module.exports = {
|
||||
"netwerk/test/unit*/**",
|
||||
],
|
||||
rules: {
|
||||
"no-global-assign": "off",
|
||||
"no-shadow": "off",
|
||||
},
|
||||
},
|
||||
|
@ -10,10 +10,10 @@ function inChildProcess() {
|
||||
);
|
||||
}
|
||||
|
||||
let URL = null;
|
||||
let uri = null;
|
||||
function makeChan() {
|
||||
return NetUtil.newChannel({
|
||||
uri: URL,
|
||||
uri,
|
||||
loadUsingSystemPrincipal: true,
|
||||
}).QueryInterface(Ci.nsIHttpChannel);
|
||||
}
|
||||
@ -34,7 +34,7 @@ add_task(async function setup() {
|
||||
ok(inChildProcess(), "Sanity check. This should run in the child process");
|
||||
// Initialize the URL. Parent runs the server
|
||||
do_send_remote_message("start-test");
|
||||
URL = await do_await_remote_message("start-test-done");
|
||||
uri = await do_await_remote_message("start-test-done");
|
||||
});
|
||||
|
||||
// This test performs a request, and checks that no cookie header are visible
|
||||
|
@ -7,7 +7,7 @@ var cacheFlushObserver = {
|
||||
};
|
||||
|
||||
// We get this from the child a bit later
|
||||
var URL = null;
|
||||
var url = null;
|
||||
|
||||
// needs to be rooted
|
||||
var cacheFlushObserver2 = {
|
||||
@ -32,17 +32,20 @@ function run_test() {
|
||||
run_test_in_child("../unit/test_alt-data_cross_process.js");
|
||||
}
|
||||
|
||||
function load_channel(url) {
|
||||
ok(url);
|
||||
URL = url; // save this to open the alt data channel later
|
||||
var chan = make_channel(url);
|
||||
function load_channel(channelUrl) {
|
||||
ok(channelUrl);
|
||||
url = channelUrl; // save this to open the alt data channel later
|
||||
var chan = make_channel(channelUrl);
|
||||
var cc = chan.QueryInterface(Ci.nsICacheInfoChannel);
|
||||
cc.preferAlternativeDataType("text/binary", "", Ci.nsICacheInfoChannel.ASYNC);
|
||||
chan.asyncOpen(new ChannelListener(readTextData, null));
|
||||
}
|
||||
|
||||
function make_channel(url, callback, ctx) {
|
||||
return NetUtil.newChannel({ uri: url, loadUsingSystemPrincipal: true });
|
||||
function make_channel(channelUrl, callback, ctx) {
|
||||
return NetUtil.newChannel({
|
||||
uri: channelUrl,
|
||||
loadUsingSystemPrincipal: true,
|
||||
});
|
||||
}
|
||||
|
||||
function readTextData(request, buffer) {
|
||||
@ -71,7 +74,7 @@ function readTextData(request, buffer) {
|
||||
}
|
||||
|
||||
function openAltChannel() {
|
||||
var chan = make_channel(URL);
|
||||
var chan = make_channel(url);
|
||||
var cc = chan.QueryInterface(Ci.nsICacheInfoChannel);
|
||||
cc.preferAlternativeDataType(
|
||||
"text/parent-binary",
|
||||
|
Loading…
Reference in New Issue
Block a user