summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/url/script-tests/anchor.js
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast/url/script-tests/anchor.js')
-rw-r--r--LayoutTests/fast/url/script-tests/anchor.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/LayoutTests/fast/url/script-tests/anchor.js b/LayoutTests/fast/url/script-tests/anchor.js
new file mode 100644
index 0000000..0387a86
--- /dev/null
+++ b/LayoutTests/fast/url/script-tests/anchor.js
@@ -0,0 +1,19 @@
+description("Test URLs that have an anchor.");
+
+cases = [
+ ["hello, world", "hello, world"],
+ ["\xc2\xa9", "\xc2\xa9"],
+ ["\ud800\udf00ss", "\ud800\udf00ss"],
+ ["%41%a", "%41%a"],
+ ["\\ud800\\u597d", "\\uFFFD\\u597D"],
+ ["a\\uFDD0", "a\\uFDD0"],
+ ["asdf#qwer", "asdf#qwer"],
+ ["#asdf", "#asdf"],
+];
+
+for (var i = 0; i < cases.length; ++i) {
+ shouldBe("canonicalize('http://www.example.com/#" + cases[i][0] + "')",
+ "'http://www.example.com/#" + cases[i][1] + "'");
+}
+
+var successfullyParsed = true;