2 // Tests that calling asyncResolve with the RESOLVE_DISABLE_IPV6 flag doesn't
3 // return any IPv6 addresses.
9 onLookupComplete(inRequest
, inRecord
, inStatus
) {
10 if (inStatus
!= Cr
.NS_OK
) {
11 Assert
.equal(inStatus
, Cr
.NS_ERROR_UNKNOWN_HOST
);
18 inRecord
.QueryInterface(Ci
.nsIDNSAddrRecord
);
19 var answer
= inRecord
.getNextAddrAsString();
20 // If there is an answer it should be an IPv4 address
22 Assert
.ok(!answer
.includes(":"));
23 Assert
.ok(answer
.includes("."));
32 const defaultOriginAttributes
= {};
37 Services
.dns
.asyncResolve(
39 Ci
.nsIDNSService
.RESOLVE_TYPE_DEFAULT
,
40 Ci
.nsIDNSService
.RESOLVE_DISABLE_IPV6
,
44 defaultOriginAttributes