Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(861)

Unified Diff: third_party/WebKit/Source/platform/fonts/win/FontFallbackWinTest.cpp

Issue 1607943004: Change the system font fallback to take lang attributes into account on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix TestExpectations for the new test Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/win/FontFallbackWin.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/fonts/win/FontFallbackWinTest.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/win/FontFallbackWinTest.cpp b/third_party/WebKit/Source/platform/fonts/win/FontFallbackWinTest.cpp
index 7076d9c1d91c88183559edc8e41fae76f2b2bf60..cadfc4bb7bfaae9970381c5f004b88ad743c519c 100644
--- a/third_party/WebKit/Source/platform/fonts/win/FontFallbackWinTest.cpp
+++ b/third_party/WebKit/Source/platform/fonts/win/FontFallbackWinTest.cpp
@@ -36,4 +36,28 @@ TEST(FontFallbackWinTest, scriptCodeForUnifiedHanFromLocaleTest)
icu::Locale("zh", "hant")));
}
+TEST(FontFallbackWinTest, scriptCodeForUnifiedHanFromSubtagsTest)
+{
+ EXPECT_EQ(USCRIPT_SIMPLIFIED_HAN,
+ scriptCodeForUnifiedHanFromSubtags("en-CN"));
+ EXPECT_EQ(USCRIPT_HIRAGANA, scriptCodeForUnifiedHanFromSubtags("en-JP"));
+ EXPECT_EQ(USCRIPT_HANGUL, scriptCodeForUnifiedHanFromSubtags("en-KR"));
+ EXPECT_EQ(USCRIPT_TRADITIONAL_HAN,
+ scriptCodeForUnifiedHanFromSubtags("en-HK"));
+ EXPECT_EQ(USCRIPT_TRADITIONAL_HAN,
+ scriptCodeForUnifiedHanFromSubtags("en-TW"));
+
+ EXPECT_EQ(USCRIPT_SIMPLIFIED_HAN,
+ scriptCodeForUnifiedHanFromSubtags("en-HanS"));
+ EXPECT_EQ(USCRIPT_TRADITIONAL_HAN,
+ scriptCodeForUnifiedHanFromSubtags("en-HanT"));
+
+ EXPECT_EQ(USCRIPT_SIMPLIFIED_HAN,
+ scriptCodeForUnifiedHanFromSubtags("en-HanS-JP"));
+ EXPECT_EQ(USCRIPT_TRADITIONAL_HAN,
+ scriptCodeForUnifiedHanFromSubtags("en-HanT-JP"));
+
+ EXPECT_EQ(USCRIPT_HAN, scriptCodeForUnifiedHanFromSubtags("en-US"));
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/win/FontFallbackWin.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698