| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "ui/views/controls/combobox/combobox.h" | 5 #include "ui/views/controls/combobox/combobox.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "build/build_config.h" |
| 11 #include "ui/base/ime/input_method.h" | 12 #include "ui/base/ime/input_method.h" |
| 12 #include "ui/base/ime/text_input_client.h" | 13 #include "ui/base/ime/text_input_client.h" |
| 13 #include "ui/base/models/combobox_model.h" | 14 #include "ui/base/models/combobox_model.h" |
| 14 #include "ui/base/models/menu_model.h" | 15 #include "ui/base/models/menu_model.h" |
| 15 #include "ui/events/event.h" | 16 #include "ui/events/event.h" |
| 16 #include "ui/events/event_constants.h" | 17 #include "ui/events/event_constants.h" |
| 17 #include "ui/events/event_utils.h" | 18 #include "ui/events/event_utils.h" |
| 18 #include "ui/events/keycodes/dom/dom_code.h" | 19 #include "ui/events/keycodes/dom/dom_code.h" |
| 19 #include "ui/events/keycodes/keyboard_codes.h" | 20 #include "ui/events/keycodes/keyboard_codes.h" |
| 20 #include "ui/views/controls/combobox/combobox_listener.h" | 21 #include "ui/views/controls/combobox/combobox_listener.h" |
| (...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 EXPECT_EQ(ASCIIToUTF16("JELLY"), menu_model->GetLabelAt(1)); | 759 EXPECT_EQ(ASCIIToUTF16("JELLY"), menu_model->GetLabelAt(1)); |
| 759 | 760 |
| 760 // Check that with STYLE_ACTION, the first item (only) is not shown. | 761 // Check that with STYLE_ACTION, the first item (only) is not shown. |
| 761 EXPECT_TRUE(menu_model->IsVisibleAt(0)); | 762 EXPECT_TRUE(menu_model->IsVisibleAt(0)); |
| 762 combobox_->SetStyle(Combobox::STYLE_ACTION); | 763 combobox_->SetStyle(Combobox::STYLE_ACTION); |
| 763 EXPECT_FALSE(menu_model->IsVisibleAt(0)); | 764 EXPECT_FALSE(menu_model->IsVisibleAt(0)); |
| 764 EXPECT_TRUE(menu_model->IsVisibleAt(1)); | 765 EXPECT_TRUE(menu_model->IsVisibleAt(1)); |
| 765 } | 766 } |
| 766 | 767 |
| 767 } // namespace views | 768 } // namespace views |
| OLD | NEW |