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/ui_test_utils.h" | 7 #include "chrome/test/base/ui_test_utils.h" |
8 #include "chrome/test/base/view_event_test_base.h" | 8 #include "chrome/test/base/view_event_test_base.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 17 matching lines...) Expand all Loading... |
28 // ViewsDelegate::GetDispositionForEvent() is used by views::MenuModelAdapter. | 28 // ViewsDelegate::GetDispositionForEvent() is used by views::MenuModelAdapter. |
29 class TestViewsDelegate : public views::ViewsDelegate { | 29 class TestViewsDelegate : public views::ViewsDelegate { |
30 public: | 30 public: |
31 TestViewsDelegate() { | 31 TestViewsDelegate() { |
32 } | 32 } |
33 | 33 |
34 ~TestViewsDelegate() { | 34 ~TestViewsDelegate() { |
35 } | 35 } |
36 | 36 |
37 // views::ViewsDelegate implementation | 37 // views::ViewsDelegate implementation |
38 virtual ui::Clipboard* GetClipboard() const OVERRIDE { | |
39 return NULL; | |
40 } | |
41 | |
42 virtual void SaveWindowPlacement(const views::Widget* widget, | 38 virtual void SaveWindowPlacement(const views::Widget* widget, |
43 const std::string& window_name, | 39 const std::string& window_name, |
44 const gfx::Rect& bounds, | 40 const gfx::Rect& bounds, |
45 ui::WindowShowState show_state) OVERRIDE { | 41 ui::WindowShowState show_state) OVERRIDE { |
46 } | 42 } |
47 | 43 |
48 virtual bool GetSavedWindowPlacement( | 44 virtual bool GetSavedWindowPlacement( |
49 const std::string& window_name, | 45 const std::string& window_name, |
50 gfx::Rect* bounds, | 46 gfx::Rect* bounds, |
51 ui::WindowShowState* show_state) const OVERRIDE { | 47 ui::WindowShowState* show_state) const OVERRIDE { |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 views::MenuItemView* menu_; | 388 views::MenuItemView* menu_; |
393 scoped_ptr<views::MenuRunner> menu_runner_; | 389 scoped_ptr<views::MenuRunner> menu_runner_; |
394 }; | 390 }; |
395 | 391 |
396 #if defined(OS_WIN) | 392 #if defined(OS_WIN) |
397 #define MAYBE_RebuildMenu DISABLED_RebuildMenu | 393 #define MAYBE_RebuildMenu DISABLED_RebuildMenu |
398 #else | 394 #else |
399 #define MAYBE_RebuildMenu RebuildMenu | 395 #define MAYBE_RebuildMenu RebuildMenu |
400 #endif | 396 #endif |
401 VIEW_TEST(MenuModelAdapterTest, MAYBE_RebuildMenu) | 397 VIEW_TEST(MenuModelAdapterTest, MAYBE_RebuildMenu) |
OLD | NEW |