summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/tests/LocalizedDateICUTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/chromium/tests/LocalizedDateICUTest.cpp')
-rw-r--r--Source/WebKit/chromium/tests/LocalizedDateICUTest.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/WebKit/chromium/tests/LocalizedDateICUTest.cpp b/Source/WebKit/chromium/tests/LocalizedDateICUTest.cpp
index 749f91038..771a3cbc0 100644
--- a/Source/WebKit/chromium/tests/LocalizedDateICUTest.cpp
+++ b/Source/WebKit/chromium/tests/LocalizedDateICUTest.cpp
@@ -30,7 +30,7 @@
#include "config.h"
-#if ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS)
+#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
#include "LocaleICU.h"
#include <gtest/gtest.h>
@@ -105,6 +105,12 @@ protected:
OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
return Labels(locale->timeAMPMLabels());
}
+
+ bool isRTL(const char* localeString)
+ {
+ OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
+ return locale->isRTL();
+ }
};
std::ostream& operator<<(std::ostream& os, const LocalizedDateICUTest::Labels& labels)
@@ -112,6 +118,14 @@ std::ostream& operator<<(std::ostream& os, const LocalizedDateICUTest::Labels& l
return os << labels.toString().utf8().data();
}
+TEST_F(LocalizedDateICUTest, isRTL)
+{
+ EXPECT_TRUE(isRTL("ar-EG"));
+ EXPECT_FALSE(isRTL("en-us"));
+ EXPECT_FALSE(isRTL("ja-jp"));
+ EXPECT_FALSE(isRTL("**invalid**"));
+}
+
TEST_F(LocalizedDateICUTest, localizedDateFormatText)
{
// Note: EXPECT_EQ(String, String) doesn't print result as string.