Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / url / script-tests / anchor.js
blobef3ce129b93c733e79bf5f2449c67448df24c7ed
1 description("Test URLs that have an anchor.");
3 cases = [ 
4   ["hello, world", "hello, world"],
5   ["\xc2\xa9", "\xc2\xa9"],
6   ["\ud800\udf00ss", "\ud800\udf00ss"],
7   ["%41%a", "%41%a"],
8   ["\\ud800\\u597d", "\\uFFFD\\u597D"],
9   ["a\\uFDD0", "a\\uFDD0"],
10   ["asdf#qwer", "asdf#qwer"],
11   ["#asdf", "#asdf"],
12   ["a\\nb\\rc\\td", "abcd"],
15 for (var i = 0; i < cases.length; ++i) {
16   shouldBe("canonicalize('http://www.example.com/#" + cases[i][0] + "')",
17            "'http://www.example.com/#" + cases[i][1] + "'");