| Index: base/i18n/number_formatting_unittest.cc
|
| diff --git a/base/i18n/number_formatting_unittest.cc b/base/i18n/number_formatting_unittest.cc
|
| index a131bf3e7d7a078dfbb028316ef91fe73e465a46..baa7ba7d807d26947e16e5d5e4adedf19091fdde 100644
|
| --- a/base/i18n/number_formatting_unittest.cc
|
| +++ b/base/i18n/number_formatting_unittest.cc
|
| @@ -99,11 +99,18 @@ TEST(NumberFormattingTest, FormatPercent) {
|
| int64_t number;
|
| const char* expected_english;
|
| const wchar_t* expected_german; // Note: Space before % isn't \x20.
|
| - const wchar_t* expected_persian; // Note: Non-Arabic numbers and %.
|
| + // Note: Eastern Arabic-Indic digits (U+06Fx) for Persian and
|
| + // Arabic-Indic digits (U+066x) for Arabic.
|
| + // See http://unicode.org/cldr/trac/ticket/9040 for details.
|
| + const wchar_t* expected_persian;
|
| + const wchar_t* expected_arabic;
|
| } cases[] = {
|
| - {0, "0%", L"0\xa0%", L"\x6f0\x200f\x66a"},
|
| - {42, "42%", L"42\xa0%", L"\x6f4\x6f2\x200f\x66a"},
|
| - {1024, "1,024%", L"1.024\xa0%", L"\x6f1\x66c\x6f0\x6f2\x6f4\x200f\x66a"},
|
| + {0, "0%", L"0\xa0%", L"\x200e\x66a\xa0\x6f0", L"\x660\xa0\x66a\x61c"},
|
| + {42, "42%", L"42\xa0%", L"\x200e\x66a\xa0\x6f4\x6f2",
|
| + L"\x664\x662\xa0\x66a\x61c"},
|
| + {1024, "1,024%", L"1.024\xa0%",
|
| + L"\x200e\x66a\xa0\x6f1\x66c\x6f0\x6f2\x6f4",
|
| + L"\x661\x66c\x660\x662\x664\xa0\x66a\x61c"},
|
| };
|
|
|
| test::ScopedRestoreICUDefaultLocale restore_locale;
|
| @@ -117,6 +124,9 @@ TEST(NumberFormattingTest, FormatPercent) {
|
| i18n::SetICUDefaultLocale("fa");
|
| EXPECT_EQ(WideToUTF16(cases[i].expected_persian),
|
| FormatPercent(cases[i].number));
|
| + i18n::SetICUDefaultLocale("ar");
|
| + EXPECT_EQ(WideToUTF16(cases[i].expected_arabic),
|
| + FormatPercent(cases[i].number));
|
| }
|
| }
|
|
|
|
|