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

Side by Side Diff: chrome/browser/cocoa/wrench_menu_controller_unittest.mm

Issue 3163023: Clean up the WrenchMenuModel so that it uses SimpleMenu::Delegate. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Fix stray rb Created 10 years, 4 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/scoped_nsobject.h" 5 #include "base/scoped_nsobject.h"
6 #include "chrome/app/chrome_dll_resource.h" 6 #include "chrome/app/chrome_dll_resource.h"
7 #include "chrome/browser/cocoa/browser_test_helper.h" 7 #include "chrome/browser/cocoa/browser_test_helper.h"
8 #import "chrome/browser/cocoa/cocoa_test_helper.h" 8 #import "chrome/browser/cocoa/cocoa_test_helper.h"
9 #import "chrome/browser/cocoa/toolbar_controller.h" 9 #import "chrome/browser/cocoa/toolbar_controller.h"
10 #import "chrome/browser/cocoa/wrench_menu_controller.h" 10 #import "chrome/browser/cocoa/wrench_menu_controller.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 EXPECT_TRUE([controller() menu]); 69 EXPECT_TRUE([controller() menu]);
70 EXPECT_GE([[controller() menu] numberOfItems], 5); 70 EXPECT_GE([[controller() menu] numberOfItems], 5);
71 } 71 }
72 72
73 TEST_F(WrenchMenuControllerTest, DispatchSimple) { 73 TEST_F(WrenchMenuControllerTest, DispatchSimple) {
74 scoped_nsobject<NSButton> button([[NSButton alloc] init]); 74 scoped_nsobject<NSButton> button([[NSButton alloc] init]);
75 [button setTag:IDC_ZOOM_PLUS]; 75 [button setTag:IDC_ZOOM_PLUS];
76 76
77 // Set fake model to test dispatching. 77 // Set fake model to test dispatching.
78 EXPECT_CALL(fake_model_, ExecuteCommand(IDC_ZOOM_PLUS)); 78 EXPECT_CALL(fake_model_, ExecuteCommand(IDC_ZOOM_PLUS));
79 [controller() setModel:&fake_model_]; 79 [controller() setWrenchMenuModel:&fake_model_];
80 80
81 [controller() dispatchWrenchMenuCommand:button.get()]; 81 [controller() dispatchWrenchMenuCommand:button.get()];
82 } 82 }
83 83
84 } // namespace 84 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698