2 var dns
= Components
.classes
["@mozilla.org/network/dns-service;1"]
3 .getService(Components
.interfaces
.nsIDNSService
);
4 var rec
= dns
.resolve("localhost", 0);
5 var answer
= rec
.getNextAddrAsString();
6 do_check_true(answer
== "127.0.0.1" || answer
== "::1");