10 "http://[1:2:3:4:5:6:7::]/",
11 "http://[::1:2:3:4:5:6:7]/",
12 "http://[1:2:a:B:c:D:e:F]/",
15 "http://[0000:0123:4567:89AB:CDEF:abcd:ef00:0000]/",
16 "http://[::192.168.1.1]/",
17 "http://[1::0.0.0.0]/",
18 "http://[1:2::255.255.255.255]/",
19 "http://[1:2:3::255.255.255.255]/",
20 "http://[1:2:3:4::255.255.255.255]/",
21 "http://[1:2:3:4:5::255.255.255.255]/",
22 "http://[1:2:3:4:5:6:255.255.255.255]/",
27 "http://[192.168.1.1]/",
32 "http://[1:2:3:4:5:6:7:]/",
33 "http://[:2:3:4:5:6:7:8]/",
34 "http://[1:2:3:4:5:6:7:8:]/",
35 "http://[:1:2:3:4:5:6:7:8]/",
36 "http://[1:2:3:4:5:6:7:8::]/",
37 "http://[::1:2:3:4:5:6:7:8]/",
38 "http://[1:2:3:4:5:6:7]/",
39 "http://[1:2:3:4:5:6:7:8:9]/",
40 "http://[00001:2:3:4:5:6:7:8]/",
41 "http://[0001:2:3:4:5:6:7:89abc]/",
42 "http://[A:b:C:d:E:f:G:h]/",
43 "http://[::192.168.1]/",
44 "http://[::192.168.1.]/",
45 "http://[::.168.1.1]/",
46 "http://[::192..1.1]/",
47 "http://[::0192.168.1.1]/",
48 "http://[::256.255.255.255]/",
49 "http://[::1x.255.255.255]/",
50 "http://[::192.4294967464.1.1]/",
51 "http://[1:2:3:4:5:6::255.255.255.255]/",
52 "http://[1:2:3:4:5:6:7:255.255.255.255]/",
56 for (let i = 0; i < valid_URIs.length; i++) {
58 Services.io.newURI(valid_URIs[i]);
60 do_throw("cannot create URI:" + valid_URIs[i]);
64 for (let i = 0; i < invalid_URIs.length; i++) {
66 Services.io.newURI(invalid_URIs[i]);
67 do_throw("should throw: " + invalid_URIs[i]);
69 Assert.equal(e.result, Cr.NS_ERROR_MALFORMED_URI);