32 lines
788 B
HTML
32 lines
788 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="windows-1252">
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
<script src="resources/utilities.js"></script>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
description("Test URLs that have an anchor.");
|
|
|
|
cases = [
|
|
["hello, world", "hello,%20world"],
|
|
["\xc2\xa9", "\xc2\xa9"],
|
|
["\ud800\udf00ss", "\ud800\udf00ss"],
|
|
["%41%a", "%41%a"],
|
|
["\\ud800\\u597d", "\\uFFFD\\u597D"],
|
|
["a\\uFDD0", "a%EF%B7%90"],
|
|
["asdf#qwer", "asdf#qwer"],
|
|
["#asdf", "#asdf"],
|
|
["a\\nb\\rc\\td", "abcd"],
|
|
];
|
|
|
|
for (var i = 0; i < cases.length; ++i) {
|
|
shouldBe("canonicalize('http://www.example.com/#" + cases[i][0] + "')",
|
|
"'http://www.example.com/#" + cases[i][1] + "'");
|
|
}
|
|
</script>
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|