/* 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/. */
"use strict";
let trrServer;
function makeChan(url) {
let chan = NetUtil.newChannel({
uri: url,
loadUsingSystemPrincipal: true,
}).QueryInterface(Ci.nsIHttpChannel); return chan;
}
function channelOpenPromise(chan) { returnnew Promise(resolve => { function finish(req, buffer) {
resolve([req, buffer]);
}
chan.asyncOpen(new ChannelListener(finish));
});
}
await new TRRDNSListener("first.bar", { expectedAnswer: "1.2.3.4" });
equal(await trrServer.requestCount("first.bar", "A"), 1);
equal(await trrServer.requestCount("first.bar", "AAAA"), 1);
equal(await trrServer.requestCount("second.bar", "A"), 0); // addr included in first response
equal(await trrServer.requestCount("second.bar", "AAAA"), 1); // will follow cname because no flag is set
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.