5 test_make_uri_1: function () {
6 assert(make_uri("chrome://conkeror/content/conkeror.js"));
8 test_make_uri_2: function () {
9 assert(make_uri("http://www.example.com/"));
11 test_make_uri_3: function () {
12 assert_error(function () { make_uri("chrome://conkeror"); });
14 test_make_uri_4: function () {
15 assert(make_uri("http://example.com/") instanceof Ci.nsIURI);
17 test_make_uri_5: function () {
18 assert(make_uri(make_file("/a/b/c")) instanceof Ci.nsIURI);
20 test_make_uri_6: function () {
21 assert_equals(make_uri(make_file("/a/b/c")).spec.substr(0,5), "file:");
26 test_compute_up_url_1: function () {
27 assert_equals(compute_up_url(make_uri("http://example.com/")),
28 "http://example.com/");
30 test_compute_up_url_2: function () {
31 assert_equals(compute_up_url(make_uri("http://example.com/foo")),
32 "http://example.com/");
34 test_compute_up_url_3: function () {
35 assert_equals(compute_up_url(make_uri("about:config")),
38 test_compute_up_url_4: function () {
39 assert_equals(compute_up_url(make_uri("http://example.com/foo#bar")),
40 "http://example.com/foo");
42 test_compute_up_url_5: function () {
43 assert_equals(compute_up_url(make_uri("http://example.com/foo?baz=quux#bar")),
44 "http://example.com/foo?baz=quux");
46 test_compute_up_url_6: function () {
47 assert_equals(compute_up_url(make_uri("http://example.com/foo?baz=quux")),
48 "http://example.com/foo");