3 /* global NetUtil, ChannelListener, CL_ALLOW_UNKNOWN_CL */
5 add_task(async function check_proxy() {
6 do_send_remote_message("start-test");
7 let URL = await do_await_remote_message("start-test-done");
8 let chan = NetUtil.newChannel({
10 loadUsingSystemPrincipal: true,
11 }).QueryInterface(Ci.nsIHttpChannel);
13 let { req, buff } = await channelOpenPromise(chan, CL_ALLOW_UNKNOWN_CL);
14 equal(buff, "content");
15 equal(req.QueryInterface(Ci.nsIHttpChannelInternal).isProxyUsed, true);
18 function channelOpenPromise(chan, flags) {
19 return new Promise(resolve => {
21 new ChannelListener((req, buff) => resolve({ req, buff }), null, flags)