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

Unified Diff: third_party/WebKit/Source/platform/text/LocaleToScriptMappingTest.cpp

Issue 2192703002: More LayoutLocale refactor with additional Chinese support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment updated as per drott review Created 4 years, 5 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/text/LocaleToScriptMapping.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/text/LocaleToScriptMappingTest.cpp
diff --git a/third_party/WebKit/Source/platform/text/LocaleToScriptMappingTest.cpp b/third_party/WebKit/Source/platform/text/LocaleToScriptMappingTest.cpp
deleted file mode 100644
index b74cbe5893865730c6f6ba752f90231395242eb9..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/platform/text/LocaleToScriptMappingTest.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "platform/text/LocaleToScriptMapping.h"
-
-#include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/text/WTFString.h"
-
-namespace blink {
-
-TEST(LocaleToScriptMappingTest, scriptCodeForHanFromLocaleTest)
-{
- struct {
- const char* locale;
- UScriptCode script;
- } tests[] = {
- { "ja-JP", USCRIPT_KATAKANA_OR_HIRAGANA },
- { "ko-KR", USCRIPT_HANGUL },
- { "zh-CN", USCRIPT_SIMPLIFIED_HAN },
- { "zh-TW", USCRIPT_TRADITIONAL_HAN },
- { "zh-HK", USCRIPT_TRADITIONAL_HAN },
-
- // icu::Locale::getDefault() returns other combinations if, for instnace,
- // English Windows with the display language set to Japanese.
- { "ja", USCRIPT_KATAKANA_OR_HIRAGANA },
- { "ja-US", USCRIPT_KATAKANA_OR_HIRAGANA },
- { "ko", USCRIPT_HANGUL },
- { "ko-US", USCRIPT_HANGUL },
-
- { "zh-hant", USCRIPT_TRADITIONAL_HAN },
-
- { "en-CN", USCRIPT_SIMPLIFIED_HAN },
- { "en-JP", USCRIPT_KATAKANA_OR_HIRAGANA },
- { "en-KR", USCRIPT_HANGUL },
- { "en-HK", USCRIPT_TRADITIONAL_HAN },
- { "en-TW", USCRIPT_TRADITIONAL_HAN },
-
- { "en-HanS", USCRIPT_SIMPLIFIED_HAN },
- { "en-HanT", USCRIPT_TRADITIONAL_HAN },
-
- { "en-HanS-JP", USCRIPT_SIMPLIFIED_HAN },
- { "en-HanT-JP", USCRIPT_TRADITIONAL_HAN },
- { "en-US-JP", USCRIPT_KATAKANA_OR_HIRAGANA },
-
- { "en-US", USCRIPT_COMMON },
- };
-
- for (auto test : tests) {
- String str(test.locale);
- EXPECT_EQ(test.script, scriptCodeForHanFromLocale(str));
-
- str = str.replace('-', '_');
- EXPECT_EQ(test.script, scriptCodeForHanFromLocale(str, '_'));
- }
-}
-
-} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/text/LocaleToScriptMapping.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698