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

Unified Diff: ui/gfx/font_fallback_mac_unittest.cc

Issue 971673002: Mac: Implement GetFallbackFontFamilies for Harfbuzz (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20150129-MacViews-Bringup5-RTHB-in-Label
Patch Set: Move to font_fallback_mac_unittest Created 5 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 | « ui/gfx/font_fallback_mac.mm ('k') | ui/gfx/gfx.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/font_fallback_mac_unittest.cc
diff --git a/ui/gfx/font_fallback_mac_unittest.cc b/ui/gfx/font_fallback_mac_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..689ec6d045e4639b50f4fe6c4e9ae6f06eb402aa
--- /dev/null
+++ b/ui/gfx/font_fallback_mac_unittest.cc
@@ -0,0 +1,21 @@
+// 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 "ui/gfx/font_fallback.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace gfx {
+
+// A targeted test for GetFallbackFontFamilies on Mac. It uses a system API that
+// only became publicly available in the 10.8 SDK. This test is to ensure it
+// behaves sensibly on all supported OS versions.
+GTEST_TEST(FontFallbackMacTest, GetFallbackFontFamilies) {
+ std::vector<std::string> fallback_families = GetFallbackFontFamilies("Arial");
+ // If there is only one fallback, it means the only fallback is the font
+ // itself.
+ EXPECT_LT(1u, fallback_families.size());
+}
+
+} // namespace gfx
« no previous file with comments | « ui/gfx/font_fallback_mac.mm ('k') | ui/gfx/gfx.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698