3 var prefs
= Services
.prefs
;
8 onLookupComplete(inRequest
, inRecord
) {
9 inRecord
.QueryInterface(Ci
.nsIDNSAddrRecord
);
10 var answer
= inRecord
.getNextAddrAsString();
11 Assert
.ok(answer
== "127.0.0.1" || answer
== "::1");
16 QueryInterface
: ChromeUtils
.generateQI(["nsIDNSListener"]),
19 const defaultOriginAttributes
= {};
22 prefs
.setCharPref("network.dns.localDomains", "local.vingtetun.org");
24 var mainThread
= Services
.tm
.currentThread
;
26 Services
.dns
.asyncResolve(
27 "local.vingtetun.org",
28 Ci
.nsIDNSService
.RESOLVE_TYPE_DEFAULT
,
33 defaultOriginAttributes
39 function do_test_2() {
40 var mainThread
= Services
.tm
.currentThread
;
42 prefs
.setCharPref("network.dns.forceResolve", "localhost");
43 Services
.dns
.asyncResolve(
45 Ci
.nsIDNSService
.RESOLVE_TYPE_DEFAULT
,
50 defaultOriginAttributes
56 function testsDone() {
57 prefs
.clearUserPref("network.dns.localDomains");
58 prefs
.clearUserPref("network.dns.forceResolve");