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

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: Add a lost comment and modify a render text unittest to not test black because of test env font con… Created 4 years, 6 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 "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.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, GetFonts) {
119 EXPECT_TRUE(OmniboxViewMac::GetFieldFont(gfx::Font::NORMAL)); 119 EXPECT_TRUE(OmniboxViewMac::GetNormalFieldFont());
120 EXPECT_TRUE(OmniboxViewMac::GetBoldFieldFont());
121 EXPECT_TRUE(OmniboxViewMac::GetLargeFont());
122 EXPECT_TRUE(OmniboxViewMac::GetSmallFont());
120 } 123 }
121 124
122 TEST_F(OmniboxViewMacTest, TabToAutocomplete) { 125 TEST_F(OmniboxViewMacTest, TabToAutocomplete) {
123 OmniboxViewMac view(NULL, profile(), NULL, NULL); 126 OmniboxViewMac view(NULL, profile(), NULL, NULL);
124 127
125 // This is deleted by the omnibox view. 128 // This is deleted by the omnibox view.
126 MockOmniboxEditModel* model = 129 MockOmniboxEditModel* model =
127 new MockOmniboxEditModel(&view, NULL, profile()); 130 new MockOmniboxEditModel(&view, NULL, profile());
128 SetModel(&view, model); 131 SetModel(&view, model);
129 132
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 199
197 // With popup open verify that pressing up and down arrow works. 200 // With popup open verify that pressing up and down arrow works.
198 popup_view.set_is_open(true); 201 popup_view.set_is_open(true);
199 model->set_up_or_down_count(0); 202 model->set_up_or_down_count(0);
200 view.OnDoCommandBySelector(@selector(moveDown:)); 203 view.OnDoCommandBySelector(@selector(moveDown:));
201 EXPECT_EQ(1, model->up_or_down_count()); 204 EXPECT_EQ(1, model->up_or_down_count());
202 model->set_up_or_down_count(0); 205 model->set_up_or_down_count(0);
203 view.OnDoCommandBySelector(@selector(moveUp:)); 206 view.OnDoCommandBySelector(@selector(moveUp:));
204 EXPECT_EQ(-1, model->up_or_down_count()); 207 EXPECT_EQ(-1, model->up_or_down_count());
205 } 208 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm ('k') | chrome/browser/ui/extensions/icon_with_badge_image_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698