| OLD | NEW |
| 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 "chrome/browser/ui/cocoa/cocoa_profile_test.h" | 7 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" |
| 8 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" | 8 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" |
| 9 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" | 9 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" |
| 10 #include "chrome/browser/ui/omnibox/omnibox_popup_view.h" | 10 #include "chrome/browser/ui/omnibox/omnibox_popup_view.h" |
| 11 #include "chrome/browser/ui/toolbar/toolbar_model_delegate.h" | 11 #include "chrome/browser/ui/toolbar/toolbar_model_delegate.h" |
| 12 #include "chrome/browser/ui/toolbar/toolbar_model_impl.h" | 12 #include "chrome/browser/ui/toolbar/toolbar_model_impl.h" |
| 13 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
| 14 #include "testing/platform_test.h" | 14 #include "testing/platform_test.h" |
| 15 #include "ui/gfx/font.h" |
| 16 #include "ui/gfx/geometry/rect.h" |
| 15 #include "ui/gfx/image/image.h" | 17 #include "ui/gfx/image/image.h" |
| 16 #include "ui/gfx/font.h" | |
| 17 #include "ui/gfx/rect.h" | |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 class MockOmniboxEditModel : public OmniboxEditModel { | 21 class MockOmniboxEditModel : public OmniboxEditModel { |
| 22 public: | 22 public: |
| 23 MockOmniboxEditModel(OmniboxView* view, | 23 MockOmniboxEditModel(OmniboxView* view, |
| 24 OmniboxEditController* controller, | 24 OmniboxEditController* controller, |
| 25 Profile* profile) | 25 Profile* profile) |
| 26 : OmniboxEditModel(view, controller, profile), | 26 : OmniboxEditModel(view, controller, profile), |
| 27 up_or_down_count_(0) { | 27 up_or_down_count_(0) { |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 194 |
| 195 // With popup open verify that pressing up and down arrow works. | 195 // With popup open verify that pressing up and down arrow works. |
| 196 popup_view.set_is_open(true); | 196 popup_view.set_is_open(true); |
| 197 model->set_up_or_down_count(0); | 197 model->set_up_or_down_count(0); |
| 198 view.OnDoCommandBySelector(@selector(moveDown:)); | 198 view.OnDoCommandBySelector(@selector(moveDown:)); |
| 199 EXPECT_EQ(1, model->up_or_down_count()); | 199 EXPECT_EQ(1, model->up_or_down_count()); |
| 200 model->set_up_or_down_count(0); | 200 model->set_up_or_down_count(0); |
| 201 view.OnDoCommandBySelector(@selector(moveUp:)); | 201 view.OnDoCommandBySelector(@selector(moveUp:)); |
| 202 EXPECT_EQ(-1, model->up_or_down_count()); | 202 EXPECT_EQ(-1, model->up_or_down_count()); |
| 203 } | 203 } |
| OLD | NEW |