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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/fonts/win/FontFallbackWin.h" 5 #include "platform/fonts/win/FontFallbackWin.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
(...skipping 18 matching lines...) Expand all
29 EXPECT_EQ(USCRIPT_HIRAGANA, scriptCodeForUnifiedHanFromLocale( 29 EXPECT_EQ(USCRIPT_HIRAGANA, scriptCodeForUnifiedHanFromLocale(
30 icu::Locale("ja", "US"))); 30 icu::Locale("ja", "US")));
31 EXPECT_EQ(USCRIPT_HANGUL, scriptCodeForUnifiedHanFromLocale( 31 EXPECT_EQ(USCRIPT_HANGUL, scriptCodeForUnifiedHanFromLocale(
32 icu::Locale("ko"))); 32 icu::Locale("ko")));
33 EXPECT_EQ(USCRIPT_HANGUL, scriptCodeForUnifiedHanFromLocale( 33 EXPECT_EQ(USCRIPT_HANGUL, scriptCodeForUnifiedHanFromLocale(
34 icu::Locale("ko", "US"))); 34 icu::Locale("ko", "US")));
35 EXPECT_EQ(USCRIPT_TRADITIONAL_HAN, scriptCodeForUnifiedHanFromLocale( 35 EXPECT_EQ(USCRIPT_TRADITIONAL_HAN, scriptCodeForUnifiedHanFromLocale(
36 icu::Locale("zh", "hant"))); 36 icu::Locale("zh", "hant")));
37 } 37 }
38 38
39 TEST(FontFallbackWinTest, scriptCodeForUnifiedHanFromSubtagsTest)
40 {
41 EXPECT_EQ(USCRIPT_SIMPLIFIED_HAN,
42 scriptCodeForUnifiedHanFromSubtags("en-CN"));
43 EXPECT_EQ(USCRIPT_HIRAGANA, scriptCodeForUnifiedHanFromSubtags("en-JP"));
44 EXPECT_EQ(USCRIPT_HANGUL, scriptCodeForUnifiedHanFromSubtags("en-KR"));
45 EXPECT_EQ(USCRIPT_TRADITIONAL_HAN,
46 scriptCodeForUnifiedHanFromSubtags("en-HK"));
47 EXPECT_EQ(USCRIPT_TRADITIONAL_HAN,
48 scriptCodeForUnifiedHanFromSubtags("en-TW"));
49
50 EXPECT_EQ(USCRIPT_SIMPLIFIED_HAN,
51 scriptCodeForUnifiedHanFromSubtags("en-HanS"));
52 EXPECT_EQ(USCRIPT_TRADITIONAL_HAN,
53 scriptCodeForUnifiedHanFromSubtags("en-HanT"));
54
55 EXPECT_EQ(USCRIPT_SIMPLIFIED_HAN,
56 scriptCodeForUnifiedHanFromSubtags("en-HanS-JP"));
57 EXPECT_EQ(USCRIPT_TRADITIONAL_HAN,
58 scriptCodeForUnifiedHanFromSubtags("en-HanT-JP"));
59
60 EXPECT_EQ(USCRIPT_HAN, scriptCodeForUnifiedHanFromSubtags("en-US"));
61 }
62
39 } // namespace blink 63 } // namespace blink
OLDNEW
« 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