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

Side by Side Diff: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm

Issue 1819753003: Allow various font weights in gfx. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: A tiny fix for the ResourceBundle... Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #import "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" 5 #import "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" 10 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 } // namespace 109 } // namespace
110 110
111 class OmniboxViewMacTest : public CocoaProfileTest { 111 class OmniboxViewMacTest : public CocoaProfileTest {
112 public: 112 public:
113 void SetModel(OmniboxViewMac* view, OmniboxEditModel* model) { 113 void SetModel(OmniboxViewMac* view, OmniboxEditModel* model) {
114 view->model_.reset(model); 114 view->model_.reset(model);
115 } 115 }
116 }; 116 };
117 117
118 TEST_F(OmniboxViewMacTest, GetFieldFont) { 118 TEST_F(OmniboxViewMacTest, GetNormalFieldFont) {
tapted 2016/03/29 20:13:46 Thanks for updating these! But I think we can just
Mikus 2016/03/30 13:58:24 Done.
119 EXPECT_TRUE(OmniboxViewMac::GetFieldFont(gfx::Font::NORMAL)); 119 EXPECT_TRUE(OmniboxViewMac::GetNormalFieldFont());
120 }
121
122 TEST_F(OmniboxViewMacTest, GetBoldFieldFont) {
123 EXPECT_TRUE(OmniboxViewMac::GetBoldFieldFont());
124 }
125
126 TEST_F(OmniboxViewMacTest, GetLargeFont) {
127 EXPECT_TRUE(OmniboxViewMac::GetLargeFont());
128 }
129
130 TEST_F(OmniboxViewMacTest, GetSmallFont) {
131 EXPECT_TRUE(OmniboxViewMac::GetSmallFont());
120 } 132 }
121 133
122 TEST_F(OmniboxViewMacTest, TabToAutocomplete) { 134 TEST_F(OmniboxViewMacTest, TabToAutocomplete) {
123 OmniboxViewMac view(NULL, profile(), NULL, NULL); 135 OmniboxViewMac view(NULL, profile(), NULL, NULL);
124 136
125 // This is deleted by the omnibox view. 137 // This is deleted by the omnibox view.
126 MockOmniboxEditModel* model = 138 MockOmniboxEditModel* model =
127 new MockOmniboxEditModel(&view, NULL, profile()); 139 new MockOmniboxEditModel(&view, NULL, profile());
128 SetModel(&view, model); 140 SetModel(&view, model);
129 141
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 208
197 // With popup open verify that pressing up and down arrow works. 209 // With popup open verify that pressing up and down arrow works.
198 popup_view.set_is_open(true); 210 popup_view.set_is_open(true);
199 model->set_up_or_down_count(0); 211 model->set_up_or_down_count(0);
200 view.OnDoCommandBySelector(@selector(moveDown:)); 212 view.OnDoCommandBySelector(@selector(moveDown:));
201 EXPECT_EQ(1, model->up_or_down_count()); 213 EXPECT_EQ(1, model->up_or_down_count());
202 model->set_up_or_down_count(0); 214 model->set_up_or_down_count(0);
203 view.OnDoCommandBySelector(@selector(moveUp:)); 215 view.OnDoCommandBySelector(@selector(moveUp:));
204 EXPECT_EQ(-1, model->up_or_down_count()); 216 EXPECT_EQ(-1, model->up_or_down_count());
205 } 217 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698