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 #include "base/callback.h" | 5 #include "base/callback.h" |
6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
7 #include "chrome/test/base/view_event_test_base.h" | 7 #include "chrome/test/base/view_event_test_base.h" |
8 #include "chrome/test/base/ui_test_utils.h" | 8 #include "chrome/test/base/ui_test_utils.h" |
9 #include "ui/base/models/menu_model.h" | 9 #include "ui/base/models/menu_model.h" |
10 #include "ui/ui_controls/ui_controls.h" | 10 #include "ui/ui_controls/ui_controls.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 return 0; | 88 return 0; |
89 } | 89 } |
90 | 90 |
91 #if defined(USE_AURA) | 91 #if defined(USE_AURA) |
92 virtual views::NativeWidgetHelperAura* CreateNativeWidgetHelper( | 92 virtual views::NativeWidgetHelperAura* CreateNativeWidgetHelper( |
93 views::NativeWidgetAura* native_widget) OVERRIDE { | 93 views::NativeWidgetAura* native_widget) OVERRIDE { |
94 return NULL; | 94 return NULL; |
95 } | 95 } |
96 #endif | 96 #endif |
97 | 97 |
| 98 content::WebContents* CreateWebContents( |
| 99 content::BrowserContext* browser_context, |
| 100 content::SiteInstance* site_instance) OVERRIDE { |
| 101 return NULL; |
| 102 } |
| 103 |
98 private: | 104 private: |
99 DISALLOW_COPY_AND_ASSIGN(TestViewsDelegate); | 105 DISALLOW_COPY_AND_ASSIGN(TestViewsDelegate); |
100 }; | 106 }; |
101 | 107 |
102 // Implement most of the ui::MenuModel pure virtual methods for subclasses | 108 // Implement most of the ui::MenuModel pure virtual methods for subclasses |
103 // | 109 // |
104 // Exceptions: | 110 // Exceptions: |
105 // virtual int GetItemCount() const = 0; | 111 // virtual int GetItemCount() const = 0; |
106 // virtual ItemType GetTypeAt(int index) const = 0; | 112 // virtual ItemType GetTypeAt(int index) const = 0; |
107 // virtual int GetCommandIdAt(int index) const = 0; | 113 // virtual int GetCommandIdAt(int index) const = 0; |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 TestViewsDelegate views_delegate_; | 383 TestViewsDelegate views_delegate_; |
378 | 384 |
379 views::MenuButton* button_; | 385 views::MenuButton* button_; |
380 TopMenuModel top_menu_model_; | 386 TopMenuModel top_menu_model_; |
381 views::MenuModelAdapter menu_model_adapter_; | 387 views::MenuModelAdapter menu_model_adapter_; |
382 views::MenuItemView* menu_; | 388 views::MenuItemView* menu_; |
383 scoped_ptr<views::MenuRunner> menu_runner_; | 389 scoped_ptr<views::MenuRunner> menu_runner_; |
384 }; | 390 }; |
385 | 391 |
386 VIEW_TEST(MenuModelAdapterTest, RebuildMenu) | 392 VIEW_TEST(MenuModelAdapterTest, RebuildMenu) |
OLD | NEW |