add simple unit test for the dns service

This commit is contained in:
cbiesinger@gmx.at 2007-08-31 15:31:20 -07:00
parent 76e443fcb0
commit a394544602

View File

@ -0,0 +1,6 @@
function run_test() {
var dns = Components.classes["@mozilla.org/network/dns-service;1"]
.getService(Components.interfaces.nsIDNSService);
var rec = dns.resolve("localhost", 0);
do_check_eq(rec.getNextAddrAsString(), "127.0.0.1");
}