Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / url / script-tests / mailto.js
blob73d2d805e3e4801025a7bc81608ecab6bdc935ea
1 description("Tests mailto: URL canonicalization");
3 cases = [
4 ["addr1", "addr1"],
5 ["addr1@foo.com", "addr1@foo.com"],
7 // Trailing whitespace is stripped.
8 ["addr1 \t ", "addr1"],
9 ["addr1?to=jon", "addr1?to=jon"],
10 ["addr1,addr2", "addr1,addr2"],
11 ["addr1, addr2", "addr1, addr2"],
12 ["addr1%2caddr2", "addr1%2caddr2"],
14 // U+10300 input as UTF-16 surrogate pair, expected as escaped UTF-8
15 ["\uD800\uDF00", "%F0%90%8C%80"],
16 ["addr1?", "addr1?"],
18 // Null character should be escaped to %00
19 // Not sure how to test null characters in JavaScript. They appear to get
20 // stripped out.
21 // ["addr1\\0addr2?foo", "addr1%00addr2?foo"],
24 for (var i = 0; i < cases.length; ++i) {
25 shouldBe("canonicalize('mailto:" + cases[i][0] + "')",
26 "'mailto:" + cases[i][1] + "'");
28 // Invalid -- UTF-8 encoded surrogate value.
29 shouldBeFalse("canonicalize('mailto:\xed\xa0\x80') == 'mailto:%EF%BF%BD'");