Merge autoland to mozilla-central. a=merge
[gecko.git] / netwerk / test / unit / test_hostnameIsSharedIPAddress.js
blobc3eaeabc0eb530ba12ec90a841a78ff53d89df81
1 "use strict";
3 function run_test() {
4   let testURIs = [
5     // 100.64/10 prefix (RFC 6598)
6     ["http://100.63.255.254", false],
7     ["http://100.64.0.0", true],
8     ["http://100.91.63.42", true],
9     ["http://100.127.255.254", true],
10     ["http://100.128.0.0", false],
11   ];
13   for (let [uri, isShared] of testURIs) {
14     let nsuri = Services.io.newURI(uri);
15     equal(isShared, Services.io.hostnameIsSharedIPAddress(nsuri));
16   }