Index: base/utf_string_conversions_unittest.cc |
=================================================================== |
--- base/utf_string_conversions_unittest.cc (revision 36459) |
+++ base/utf_string_conversions_unittest.cc (working copy) |
@@ -91,8 +91,8 @@ |
} convert_cases[] = { |
// Regular UTF-8 input. |
{"\xe4\xbd\xa0\xe5\xa5\xbd", L"\x4f60\x597d", true}, |
- // Non-character is rejected. |
- {"\xef\xbf\xbfHello", L"\xfffdHello", false}, |
+ // Non-character is passed through. |
+ {"\xef\xbf\xbfHello", L"\xffffHello", true}, |
// Truncated UTF-8 sequence. |
{"\xe4\xa0\xe5\xa5\xbd", L"\xfffd\x597d", false}, |
// Truncated off the end. |
@@ -105,10 +105,10 @@ |
// The result will either be in UTF-16 or UTF-32. |
#if defined(WCHAR_T_IS_UTF16) |
{"A\xF0\x90\x8C\x80z", L"A\xd800\xdf00z", true}, |
- {"A\xF4\x8F\xBF\xBEz", L"A\xfffdz", false}, |
+ {"A\xF4\x8F\xBF\xBEz", L"A\xdbff\xdffez", true}, |
#elif defined(WCHAR_T_IS_UTF32) |
{"A\xF0\x90\x8C\x80z", L"A\x10300z", true}, |
- {"A\xF4\x8F\xBF\xBEz", L"A\xfffdz", false}, |
+ {"A\xF4\x8F\xBF\xBEz", L"A\x10fffez", true}, |
#endif |
}; |
@@ -148,9 +148,9 @@ |
{L"\x4f60\x597d", "\xe4\xbd\xa0\xe5\xa5\xbd", true}, |
// Test a non-BMP character. |
{L"\xd800\xdf00", "\xF0\x90\x8C\x80", true}, |
- // Non-characters are rejected. |
- {L"\xffffHello", "\xef\xbf\xbdHello", false}, |
- {L"\xdbff\xdffeHello", "\xef\xbf\xbdHello", false}, |
+ // Non-characters are passed through. |
+ {L"\xffffHello", "\xEF\xBF\xBFHello", true}, |
+ {L"\xdbff\xdffeHello", "\xF4\x8F\xBF\xBEHello", true}, |
// The first character is a truncated UTF-16 character. |
{L"\xd800\x597d", "\xef\xbf\xbd\xe5\xa5\xbd", false}, |
// Truncated at the end. |
@@ -180,9 +180,9 @@ |
{L"\x4f60\x597d", "\xe4\xbd\xa0\xe5\xa5\xbd", true}, |
// Test a non-BMP character. |
{L"A\x10300z", "A\xF0\x90\x8C\x80z", true}, |
- // Non-characters are rejected. |
- {L"\xffffHello", "\xEF\xBF\xBDHello", false}, |
- {L"\x10fffeHello", "\xEF\xBF\xBDHello", false}, |
+ // Non-characters are passed through. |
+ {L"\xffffHello", "\xEF\xBF\xBFHello", true}, |
+ {L"\x10fffeHello", "\xF4\x8F\xBF\xBEHello", true}, |
// Invalid Unicode code points. |
{L"\xfffffffHello", "\xEF\xBF\xBDHello", false}, |
// The first character is a truncated UTF-16 character. |