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

Unified Diff: ui/base/resource/resource_bundle_unittest.cc

Issue 19666006: Supports FontList in Textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removes ResourceBundle::Delegate::GetFontList. Created 7 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
Index: ui/base/resource/resource_bundle_unittest.cc
diff --git a/ui/base/resource/resource_bundle_unittest.cc b/ui/base/resource/resource_bundle_unittest.cc
index bbfc53324e2b689dadefb9f131f7e0ef90f68d43..6a7b2b7db9c15e0b2a5f40ee8b864b9ed822b2b1 100644
--- a/ui/base/resource/resource_bundle_unittest.cc
+++ b/ui/base/resource/resource_bundle_unittest.cc
@@ -83,7 +83,8 @@ class MockResourceBundleDelegate : public ui::ResourceBundle::Delegate {
*value = GetLocalizedStringMock(message_id);
return true;
}
- MOCK_METHOD1(GetFontMock, gfx::Font*(ui::ResourceBundle::FontStyle style));
+ MOCK_METHOD1(GetFontMock,
+ gfx::Font*(ui::ResourceBundle::FontStyle style));
virtual scoped_ptr<gfx::Font> GetFont(
ui::ResourceBundle::FontStyle style) OVERRIDE {
return scoped_ptr<gfx::Font>(GetFontMock(style));
@@ -307,7 +308,7 @@ TEST_F(ResourceBundleTest, DelegateGetLocalizedString) {
EXPECT_EQ(data, result);
}
-TEST_F(ResourceBundleTest, DelegateGetFont) {
+TEST_F(ResourceBundleTest, DelegateGetFontList) {
MockResourceBundleDelegate delegate;
ResourceBundle* resource_bundle = CreateResourceBundle(&delegate);
@@ -318,6 +319,10 @@ TEST_F(ResourceBundleTest, DelegateGetFont) {
.Times(8)
.WillRepeatedly(Return(test_font));
+ const gfx::FontList* font_list =
+ &resource_bundle->GetFontList(ui::ResourceBundle::BaseFont);
+ EXPECT_TRUE(font_list);
+
const gfx::Font* font =
&resource_bundle->GetFont(ui::ResourceBundle::BaseFont);
EXPECT_TRUE(font);

Powered by Google App Engine
This is Rietveld 408576698