Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
1 function run_test() {
2 var feedFeedURI = ios.newURI("feed://example.com/feed.xml", null, null);
3 var httpFeedURI = ios.newURI("feed:http://example.com/feed.xml", null, null);
4 var httpURI = ios.newURI("http://example.com/feed.xml", null, null);
6 var httpsFeedURI =
7 ios.newURI("feed:https://example.com/feed.xml", null, null);
8 var httpsURI = ios.newURI("https://example.com/feed.xml", null, null);
10 var feedChannel = ios.newChannelFromURI(feedFeedURI, null);
11 var httpChannel = ios.newChannelFromURI(httpFeedURI, null);
12 var httpsChannel = ios.newChannelFromURI(httpsFeedURI, null);
14 // not setting .originalURI to the original URI is naughty
15 do_check_true(feedFeedURI.equals(feedChannel.originalURI));
16 do_check_true(httpFeedURI.equals(httpChannel.originalURI));
17 do_check_true(httpsFeedURI.equals(httpsChannel.originalURI));
19 // actually using the horrible mess that's a feed: URI is suicidal
20 do_check_true(httpURI.equals(feedChannel.URI));
21 do_check_true(httpURI.equals(httpChannel.URI));
22 do_check_true(httpsURI.equals(httpsChannel.URI));
24 // check that we don't throw creating feed: URIs from file and ftp
25 var ftpFeedURI = ios.newURI("feed:ftp://example.com/feed.xml", null, null);
26 var fileFeedURI = ios.newURI("feed:file:///var/feed.xml", null, null);
27 }