6 var uri1
= ios
.newURI("http://example.com#bar");
7 var uri2
= ios
.newURI("http://example.com/#bar");
8 Assert
.ok(uri1
.equals(uri2
));
10 uri1
= uri1
.mutate().setSpec("http://example.com?bar").finalize();
11 uri2
= uri2
.mutate().setSpec("http://example.com/?bar").finalize();
12 Assert
.ok(uri1
.equals(uri2
));
14 // see https://bugzilla.mozilla.org/show_bug.cgi?id=665706
15 // ";" is not parsed as special anymore and thus ends up
16 // in the authority component (see RFC 3986)
17 uri1
= uri1
.mutate().setSpec("http://example.com;bar").finalize();
18 uri2
= uri2
.mutate().setSpec("http://example.com/;bar").finalize();
19 Assert
.ok(!uri1
.equals(uri2
));
21 uri1
= uri1
.mutate().setSpec("http://example.com#").finalize();
22 uri2
= uri2
.mutate().setSpec("http://example.com/#").finalize();
23 Assert
.ok(uri1
.equals(uri2
));
25 uri1
= uri1
.mutate().setSpec("http://example.com?").finalize();
26 uri2
= uri2
.mutate().setSpec("http://example.com/?").finalize();
27 Assert
.ok(uri1
.equals(uri2
));
29 // see https://bugzilla.mozilla.org/show_bug.cgi?id=665706
30 // ";" is not parsed as special anymore and thus ends up
31 // in the authority component (see RFC 3986)
32 uri1
= uri1
.mutate().setSpec("http://example.com;").finalize();
33 uri2
= uri2
.mutate().setSpec("http://example.com/;").finalize();
34 Assert
.ok(!uri1
.equals(uri2
));
36 uri1
= uri1
.mutate().setSpec("http://example.com").finalize();
37 uri2
= uri2
.mutate().setSpec("http://example.com/").finalize();
38 Assert
.ok(uri1
.equals(uri2
));