blob: 6a2655f9961f325f1d06b9ac7da7095fdbd4b5dd [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script src="resources/utilities.js"></script>
</head>
<body>
<script>
description("Test basic features of URL canonicalization");
cases = [
["http://example.com/", "http://example.com/"],
["/", "http://example.org/"]
];
var originalBaseURL = canonicalize(".");
setBaseURL("http://example.org/foo/bar");
for (var i = 0; i < cases.length; ++i) {
shouldBe("canonicalize('" + cases[i][0] + "')",
"'" + cases[i][1] + "'");
}
setBaseURL(originalBaseURL);
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>