Commit 27be5b2f authored by Jungshik Shin's avatar Jungshik Shin Committed by Commit Bot

Roll ICU to 94d819f

Add a test for German time format (12hr with AM/PM marker).

It has 3 changes:

 https://chromium.googlesource.com/chromium/deps/icu.git/+log/e3b480d..94d819f

 2017-12-13 jshin@chromium.org Update German AM/PM marker to the previous value
 2017-12-13 jshin@chromium.org Cherry-pick an upstream fix for UTF8 to UTF8 conversion
 2017-12-12 jshin@chromium.org Cherry-pick an upstream fix for Calendar class

Bug: 794737,794390,792537
Test: base_unittests --gtest_filter=TimeFormat*.*TimeOfDayDE
Test: crbug.com/794737#c2
Change-Id: Ifa6d31624cbd9d4edc1b776e34527d8e842f7290
Reviewed-on: https://chromium-review.googlesource.com/826363
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524189}
parent 79ec59bb
......@@ -404,7 +404,7 @@ deps = {
Var('chromium_git') + '/chromium/deps/hunspell_dictionaries.git' + '@' + 'a9bac57ce6c9d390a52ebaad3259f5fdb871210e',
'src/third_party/icu':
Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'e3b480d3be4446ea17011c0cdc9c4cd380a5c58f',
Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '94d819fa3e7e71f3dd8210d428c213ddb6e2b336',
'src/third_party/jsoncpp/source':
Var('chromium_git') + '/external/github.com/open-source-parsers/jsoncpp.git' + '@' + 'f572e8e42e22cfcf5ab0aea26574f408943edfa4', # from svn 248
......
......@@ -171,6 +171,34 @@ TEST(TimeFormattingTest, TimeFormatTimeOfDayJP) {
string16 clock12h_pm(UTF8ToUTF16(u8"午後3:42"));
string16 clock12h(ASCIIToUTF16("3:42"));
// The default is 24h clock.
EXPECT_EQ(clock24h, TimeFormatTimeOfDay(time));
EXPECT_EQ(k24HourClock, GetHourClockType());
// k{Keep,Drop}AmPm should not affect for 24h clock.
EXPECT_EQ(clock24h, TimeFormatTimeOfDayWithHourClockType(time, k24HourClock,
kKeepAmPm));
EXPECT_EQ(clock24h, TimeFormatTimeOfDayWithHourClockType(time, k24HourClock,
kDropAmPm));
// k{Keep,Drop}AmPm affects for 12h clock.
EXPECT_EQ(clock12h_pm, TimeFormatTimeOfDayWithHourClockType(
time, k12HourClock, kKeepAmPm));
EXPECT_EQ(clock12h, TimeFormatTimeOfDayWithHourClockType(time, k12HourClock,
kDropAmPm));
}
TEST(TimeFormattingTest, TimeFormatTimeOfDayDE) {
// Test for a locale that uses different mark than "AM" and "PM".
// As an instance, we use third_party/icu/source/data/locales/de.txt.
test::ScopedRestoreICUDefaultLocale restore_locale;
i18n::SetICUDefaultLocale("de");
ScopedRestoreDefaultTimezone la_time("America/Los_Angeles");
Time time;
EXPECT_TRUE(Time::FromUTCExploded(kTestDateTimeExploded, &time));
string16 clock24h(ASCIIToUTF16("15:42"));
string16 clock12h_pm(UTF8ToUTF16("3:42 nachm."));
string16 clock12h(ASCIIToUTF16("3:42"));
// The default is 24h clock.
EXPECT_EQ(clock24h, TimeFormatTimeOfDay(time));
EXPECT_EQ(k24HourClock, GetHourClockType());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment