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

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

Issue 3008009: DISABLE WrenchMenuControllerTest.Initialized. (Closed)
Patch Set: Change bug that comment points to. Created 10 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 30 matching lines...) Expand all
41 WrenchMenuController* controller() { 41 WrenchMenuController* controller() {
42 return [toolbar_controller_ wrenchMenuController]; 42 return [toolbar_controller_ wrenchMenuController];
43 } 43 }
44 44
45 BrowserTestHelper helper_; 45 BrowserTestHelper helper_;
46 scoped_nsobject<ViewResizerPong> resize_delegate_; 46 scoped_nsobject<ViewResizerPong> resize_delegate_;
47 MockWrenchMenuModel fake_model_; 47 MockWrenchMenuModel fake_model_;
48 scoped_nsobject<ToolbarController> toolbar_controller_; 48 scoped_nsobject<ToolbarController> toolbar_controller_;
49 }; 49 };
50 50
51 TEST_F(WrenchMenuControllerTest, Initialized) { 51 // Test crashes sometimes. http://crbug.com/49206
52 TEST_F(WrenchMenuControllerTest, DISABLED_Initialized) {
52 EXPECT_TRUE([controller() menu]); 53 EXPECT_TRUE([controller() menu]);
53 EXPECT_GE([[controller() menu] numberOfItems], 5); 54 EXPECT_GE([[controller() menu] numberOfItems], 5);
54 } 55 }
55 56
56 // Test crashes sometimes. 57 // Test crashes sometimes. http://crbug.com/49206
57 // http://code.google.com/p/chromium/issues/detail?id=49206
58 TEST_F(WrenchMenuControllerTest, DISABLED_DispatchSimple) { 58 TEST_F(WrenchMenuControllerTest, DISABLED_DispatchSimple) {
59 scoped_nsobject<NSButton> button([[NSButton alloc] init]); 59 scoped_nsobject<NSButton> button([[NSButton alloc] init]);
60 [button setTag:IDC_ZOOM_PLUS]; 60 [button setTag:IDC_ZOOM_PLUS];
61 61
62 // Set fake model to test dispatching. 62 // Set fake model to test dispatching.
63 EXPECT_CALL(fake_model_, ExecuteCommand(IDC_ZOOM_PLUS)); 63 EXPECT_CALL(fake_model_, ExecuteCommand(IDC_ZOOM_PLUS));
64 [controller() setModel:&fake_model_]; 64 [controller() setModel:&fake_model_];
65 65
66 [controller() dispatchWrenchMenuCommand:button.get()]; 66 [controller() dispatchWrenchMenuCommand:button.get()];
67 } 67 }
68 68
69 // Test crashes sometimes. 69 // Test crashes sometimes. http://crbug.com/49206
70 // http://code.google.com/p/chromium/issues/detail?id=49206
71 TEST_F(WrenchMenuControllerTest, DISABLED_DispatchSegmentedControl) { 70 TEST_F(WrenchMenuControllerTest, DISABLED_DispatchSegmentedControl) {
72 // Set fake model to test dispatching. 71 // Set fake model to test dispatching.
73 EXPECT_CALL(fake_model_, ExecuteCommand(IDC_CUT)); 72 EXPECT_CALL(fake_model_, ExecuteCommand(IDC_CUT));
74 [controller() setModel:&fake_model_]; 73 [controller() setModel:&fake_model_];
75 74
76 scoped_nsobject<NSSegmentedControl> control( 75 scoped_nsobject<NSSegmentedControl> control(
77 [[NSSegmentedControl alloc] init]); 76 [[NSSegmentedControl alloc] init]);
78 [control setSegmentCount:2]; 77 [control setSegmentCount:2];
79 [[control cell] setTag:IDC_CUT forSegment:0]; 78 [[control cell] setTag:IDC_CUT forSegment:0];
80 [[control cell] setSelectedSegment:0]; 79 [[control cell] setSelectedSegment:0];
81 80
82 [controller() dispatchWrenchMenuCommand:control.get()]; 81 [controller() dispatchWrenchMenuCommand:control.get()];
83 } 82 }
84 83
85 } // namespace 84 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698