summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/tests/LocaleMacTest.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-23 10:25:11 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-23 10:25:11 +0200
commit5ea819f80c6840c492386bfafbffb059c7e2091f (patch)
tree42ad0b1d82eff090d14278a088ea0f4840a0f938 /Source/WebKit/chromium/tests/LocaleMacTest.cpp
parent43a42f108af6bcbd91f2672731c3047c26213af1 (diff)
downloadqtwebkit-5ea819f80c6840c492386bfafbffb059c7e2091f.tar.gz
Imported WebKit commit 20434eb8eb95065803473139d8794e98a7672f75 (http://svn.webkit.org/repository/webkit/trunk@132191)
New snapshot that should fix build with latest qtbase and the QPlastiqueStyle removal
Diffstat (limited to 'Source/WebKit/chromium/tests/LocaleMacTest.cpp')
-rw-r--r--Source/WebKit/chromium/tests/LocaleMacTest.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/Source/WebKit/chromium/tests/LocaleMacTest.cpp b/Source/WebKit/chromium/tests/LocaleMacTest.cpp
index 91482d94d..e9e55d81c 100644
--- a/Source/WebKit/chromium/tests/LocaleMacTest.cpp
+++ b/Source/WebKit/chromium/tests/LocaleMacTest.cpp
@@ -144,6 +144,12 @@ protected:
return locale->shortMonthLabels()[index];
}
+ String standAloneMonthLabel(const String& localeString, unsigned index)
+ {
+ OwnPtr<LocaleMac> locale = LocaleMac::create(localeString);
+ return locale->standAloneMonthLabels()[index];
+ }
+
String shortStandAloneMonthLabel(const String& localeString, unsigned index)
{
OwnPtr<LocaleMac> locale = LocaleMac::create(localeString);
@@ -256,7 +262,7 @@ TEST_F(LocaleMacTest, isRTL)
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
TEST_F(LocaleMacTest, monthFormat)
{
- EXPECT_STREQ("MMM yyyy", monthFormat("en_US").utf8().data());
+ EXPECT_STREQ("MMMM yyyy", monthFormat("en_US").utf8().data());
EXPECT_STREQ("yyyy\xE5\xB9\xB4M\xE6\x9C\x88", monthFormat("ja_JP").utf8().data());
// fr_FR and ru return different results on OS versions.
@@ -278,6 +284,21 @@ TEST_F(LocaleMacTest, shortTimeFormat)
EXPECT_STREQ("H:mm", shortTimeFormat("ja_JP").utf8().data());
}
+TEST_F(LocaleMacTest, standAloneMonthLabels)
+{
+ EXPECT_STREQ("January", standAloneMonthLabel("en_US", January).utf8().data());
+ EXPECT_STREQ("June", standAloneMonthLabel("en_US", June).utf8().data());
+ EXPECT_STREQ("December", standAloneMonthLabel("en_US", December).utf8().data());
+
+ EXPECT_STREQ("janvier", standAloneMonthLabel("fr_FR", January).utf8().data());
+ EXPECT_STREQ("juin", standAloneMonthLabel("fr_FR", June).utf8().data());
+ EXPECT_STREQ("d\xC3\xA9" "cembre", standAloneMonthLabel("fr_FR", December).utf8().data());
+
+ EXPECT_STREQ("1\xE6\x9C\x88", standAloneMonthLabel("ja_JP", January).utf8().data());
+ EXPECT_STREQ("6\xE6\x9C\x88", standAloneMonthLabel("ja_JP", June).utf8().data());
+ EXPECT_STREQ("12\xE6\x9C\x88", standAloneMonthLabel("ja_JP", December).utf8().data());
+}
+
TEST_F(LocaleMacTest, shortMonthLabels)
{
EXPECT_STREQ("Jan", shortMonthLabel("en_US", 0).utf8().data());