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

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

Issue 1652153003: Move toolbar_model_{impl,delegate}.{cc,h} to components/toolbar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@3
Patch Set: Rebase Created 4 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 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"
11 #include "chrome/browser/ui/omnibox/chrome_omnibox_client.h" 11 #include "chrome/browser/ui/omnibox/chrome_omnibox_client.h"
12 #include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h" 12 #include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h"
13 #include "chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h" 13 #include "chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h"
14 #include "chrome/browser/ui/toolbar/toolbar_model_impl.h"
15 #include "chrome/test/base/testing_profile.h" 14 #include "chrome/test/base/testing_profile.h"
16 #include "components/omnibox/browser/omnibox_popup_model.h" 15 #include "components/omnibox/browser/omnibox_popup_model.h"
17 #include "components/omnibox/browser/omnibox_popup_view.h" 16 #include "components/omnibox/browser/omnibox_popup_view.h"
17 #include "components/toolbar/toolbar_model_impl.h"
18 #include "testing/platform_test.h" 18 #include "testing/platform_test.h"
19 #include "ui/gfx/font.h" 19 #include "ui/gfx/font.h"
20 #include "ui/gfx/geometry/rect.h" 20 #include "ui/gfx/geometry/rect.h"
21 #include "ui/gfx/image/image.h" 21 #include "ui/gfx/image/image.h"
22 22
23 namespace { 23 namespace {
24 24
25 class MockOmniboxEditModel : public OmniboxEditModel { 25 class MockOmniboxEditModel : public OmniboxEditModel {
26 public: 26 public:
27 MockOmniboxEditModel(OmniboxView* view, 27 MockOmniboxEditModel(OmniboxView* view,
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 195
196 // With popup open verify that pressing up and down arrow works. 196 // With popup open verify that pressing up and down arrow works.
197 popup_view.set_is_open(true); 197 popup_view.set_is_open(true);
198 model->set_up_or_down_count(0); 198 model->set_up_or_down_count(0);
199 view.OnDoCommandBySelector(@selector(moveDown:)); 199 view.OnDoCommandBySelector(@selector(moveDown:));
200 EXPECT_EQ(1, model->up_or_down_count()); 200 EXPECT_EQ(1, model->up_or_down_count());
201 model->set_up_or_down_count(0); 201 model->set_up_or_down_count(0);
202 view.OnDoCommandBySelector(@selector(moveUp:)); 202 view.OnDoCommandBySelector(@selector(moveUp:));
203 EXPECT_EQ(-1, model->up_or_down_count()); 203 EXPECT_EQ(-1, model->up_or_down_count());
204 } 204 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698