Lines Matching full:charcode
11 function testIDNEncode(charCode)
13 var str = String.fromCharCode(charCode);
20 function testIDNEncodeNotFirstCharacter(charCode)
22 var str = String.fromCharCode(charCode);
32 function testIDNRoundTrip(charCode)
34 var str = String.fromCharCode(charCode);
42 function testIDNRoundTripNotFirstCharacter(charCode)
44 var str = String.fromCharCode(charCode);
62 function expectedTestResult(charCode, expected)
67 return "'" + escape(String.fromCharCode(charCode)) + "'";
71 function testIDNCharacter(charCode, expected, expectedNotFirstCharacter)
76 shouldBe(testFunctionName(expected) + "(0x" + charCode.toString(16) + ")",
77 expectedTestResult(charCode, expected));
79 shouldBe(testFunctionName(expectedNotFirstCharacter) + "NotFirstCharacter(0x" + charCode.toString(16) + ")",
80 expectedTestResult(charCode, expectedNotFirstCharacter));
83 function testBecomesSpaceIDNCharacter(charCode)
85 shouldBe("testIDNRoundTrip(0x" + charCode.toString(16) + ")", "'%20'");
86 shouldBe("testIDNRoundTripFirstCharacter(0x" + charCode.toString(16) + ")", "'%20'");
89 function testBecomesASCIIIDNCharacter(charCode, expected)
91 shouldBe("testIDNRoundTrip(0x" + charCode.toString(16) + ")", "'" + expected + "'");
92 shouldBe("testIDNRoundTripFirstCharacter(0x" + charCode.toString(16) + ")", "'" + expected + "'");
95 function testDisallowedIDNCharacter(charCode)
97 shouldBe("testIDNRoundTrip(0x" + charCode.toString(16) + ")", "'punycode'");
98 shouldBe("testIDNRoundTripFirstCharacter(0x" + charCode.toString(16) + ")", "'punycode'");
101 function testAllowedIDNCharacter(charCode)
103 var expected = escape(String.fromCharCode(charCode));
104 shouldBe("testIDNRoundTrip(0x" + charCode.toString(16) + ")", "'" + expected + "'");
105 shouldBe("testIDNRoundTripFirstCharacter(0x" + charCode.toString(16) + ")", "'" + expected + "'");
108 function testDoesNotEncodeIDNCharacter(charCode)
110 var expected = escape(String.fromCharCode(charCode));
111 shouldBe("testIDNEncode(0x" + charCode.toString(16) + ")", "'" + expected + "'");
112 shouldBe("testIDNEncodeTripFirstCharacter(0x" + charCode.toString(16) + ")", "'" + expected + "'");