1 description("Test basic features of URL canonicalization"); 2 3 cases = [ 4 ["http://example.com/", "http://example.com/"], 5 ["/", "http://example.org/"] 6 ]; 7 8 var originalBaseURL = canonicalize("."); 9 setBaseURL("http://example.org/foo/bar"); 10 11 for (var i = 0; i < cases.length; ++i) { 12 shouldBe("canonicalize('" + cases[i][0] + "')", 13 "'" + cases[i][1] + "'"); 14 } 15 16 setBaseURL(originalBaseURL); 17 18 var successfullyParsed = true; 19