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

Side by Side Diff: chrome/browser/ui/views/menu_test_base.h

Issue 1951223002: MacViews: Fix failing Menu Runner Cocoa Tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nit. Created 4 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_UI_VIEWS_MENU_TEST_BASE_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_MENU_TEST_BASE_H_
6 #define CHROME_BROWSER_UI_VIEWS_MENU_TEST_BASE_H_ 6 #define CHROME_BROWSER_UI_VIEWS_MENU_TEST_BASE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 views::MenuItemView* menu() { 50 views::MenuItemView* menu() {
51 return menu_; 51 return menu_;
52 } 52 }
53 53
54 int last_command() const { 54 int last_command() const {
55 return last_command_; 55 return last_command_;
56 } 56 }
57 57
58 protected: 58 protected:
59 views::MenuRunner* menu_runner() { return menu_runner_.get(); }
60
59 // Called to populate the menu. 61 // Called to populate the menu.
60 virtual void BuildMenu(views::MenuItemView* menu) = 0; 62 virtual void BuildMenu(views::MenuItemView* menu) = 0;
61 63
62 // Called once the menu is open. 64 // Called once the menu is open.
63 virtual void DoTestWithMenuOpen() = 0; 65 virtual void DoTestWithMenuOpen() = 0;
64 66
65 // Returns a bitmask of flags to use when creating the |menu_runner_|. By 67 // Returns a bitmask of flags to use when creating the |menu_runner_|. By
66 // default, this is only views::MenuRunner::HAS_MNEMONICS. 68 // default, this is only views::MenuRunner::HAS_MNEMONICS.
67 virtual int GetMenuRunnerFlags(); 69 virtual int GetMenuRunnerFlags();
68 70
(...skipping 17 matching lines...) Expand all
86 views::MenuItemView* menu_; 88 views::MenuItemView* menu_;
87 std::unique_ptr<views::MenuRunner> menu_runner_; 89 std::unique_ptr<views::MenuRunner> menu_runner_;
88 90
89 // The command id of the last pressed menu item since the menu was opened. 91 // The command id of the last pressed menu item since the menu was opened.
90 int last_command_; 92 int last_command_;
91 93
92 DISALLOW_COPY_AND_ASSIGN(MenuTestBase); 94 DISALLOW_COPY_AND_ASSIGN(MenuTestBase);
93 }; 95 };
94 96
95 #endif // CHROME_BROWSER_UI_VIEWS_MENU_TEST_BASE_H_ 97 #endif // CHROME_BROWSER_UI_VIEWS_MENU_TEST_BASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/menu_controller_interactive_uitest.cc ('k') | ui/views/controls/menu/menu_runner_cocoa_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698