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

Unified Diff: Source/platform/fonts/android/FontCacheAndroidTest.cpp

Issue 185863007: Try last resort on no-match in platformFallbackForCharacter on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Unit test Created 6 years, 10 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 | « Source/platform/fonts/android/FontCacheAndroid.cpp ('k') | Source/platform/fonts/skia/FontCacheSkia.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/android/FontCacheAndroidTest.cpp
diff --git a/Source/platform/fonts/android/FontCacheAndroidTest.cpp b/Source/platform/fonts/android/FontCacheAndroidTest.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..2a2f369e4092d19fc56fcf67f04ab7f81d5abcb5
--- /dev/null
+++ b/Source/platform/fonts/android/FontCacheAndroidTest.cpp
@@ -0,0 +1,29 @@
+// Copyright 2014 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 "config.h"
+#include "platform/fonts/FontCache.h"
+
+#include "platform/fonts/SimpleFontData.h"
+#include <gtest/gtest.h>
+
+namespace WebCore {
+
+TEST(FontCacheAndroid, platformFallbackForCharacter)
+{
+ // A Latin character in the common locale system font, but not in the
+ // Chinese locale-preferred font.
+ const UChar32 testChar = 228;
+
+ FontDescription fontDescription;
+ fontDescription.setScript(USCRIPT_SIMPLIFIED_HAN);
+ fontDescription.setGenericFamily(FontDescription::StandardFamily);
+
+ FontCache* fontCache = FontCache::fontCache();
+ ASSERT_TRUE(fontCache);
+ RefPtr<SimpleFontData> fontData = fontCache->platformFallbackForCharacter(fontDescription, testChar, 0);
+ EXPECT_TRUE(fontData);
+}
+
+} // namespace WebCore
« no previous file with comments | « Source/platform/fonts/android/FontCacheAndroid.cpp ('k') | Source/platform/fonts/skia/FontCacheSkia.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698