Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- Manifest: netwerk/test/unit/xpcshell.toml
"use strict";
function run_test() {
let testURIs = [
["about:robots", false],
// 0/8 prefix (RFC 1122)
// 10/8 prefix (RFC 1918)
// 169.254/16 prefix (Link Local)
// 172.16/12 prefix (RFC 1918)
// 192.168/16 prefix (RFC 1918)
// IPv6 any address
];
for (let [uri, isLocal] of testURIs) {
let nsuri = Services.io.newURI(uri);
equal(isLocal, Services.io.hostnameIsLocalIPAddress(nsuri));
}
}