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

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

Issue 178037: Make all of our unit tests be PlatformTests to get an autorelease pool.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/scoped_nsautorelease_pool.h" 7 #include "base/scoped_nsautorelease_pool.h"
8 #import "base/scoped_nsobject.h" 8 #import "base/scoped_nsobject.h"
9 #import "chrome/browser/cocoa/tab_controller.h" 9 #import "chrome/browser/cocoa/tab_controller.h"
10 #import "chrome/browser/cocoa/tab_controller_target.h" 10 #import "chrome/browser/cocoa/tab_controller_target.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 [[controller view] removeFromSuperview]; 144 [[controller view] removeFromSuperview];
145 } 145 }
146 146
147 // Tests selecting the tab with the mouse click and ensuring the target/action 147 // Tests selecting the tab with the mouse click and ensuring the target/action
148 // get called. 148 // get called.
149 // TODO(pinkerton): It's yucky that TabView bakes in the dragging so that we 149 // TODO(pinkerton): It's yucky that TabView bakes in the dragging so that we
150 // can't test this class w/out lots of extra effort. When cole finishes the 150 // can't test this class w/out lots of extra effort. When cole finishes the
151 // rewrite, we should move all that logic out into a separate controller which 151 // rewrite, we should move all that logic out into a separate controller which
152 // we can dependency-inject/mock so it has very simple click behavior for unit 152 // we can dependency-inject/mock so it has very simple click behavior for unit
153 // testing. 153 // testing.
154 TEST_F(TabControllerTest, UserSelection) { 154 TEST_F(TabControllerTest, DISABLED_UserSelection) {
Mark Mentovai 2009/08/31 19:03:24 This too.
pink (ping after 24hrs) 2009/08/31 19:06:04 Done.
155 NSWindow* window = cocoa_helper_.window(); 155 NSWindow* window = cocoa_helper_.window();
156 156
157 // Create a tab at a known location in the window that we can click on 157 // Create a tab at a known location in the window that we can click on
158 // to activate selection. 158 // to activate selection.
159 scoped_nsobject<TabController> controller([[TabController alloc] init]); 159 scoped_nsobject<TabController> controller([[TabController alloc] init]);
160 [[window contentView] addSubview:[controller view]]; 160 [[window contentView] addSubview:[controller view]];
161 NSRect frame = [[controller view] frame]; 161 NSRect frame = [[controller view] frame];
162 frame.size.width = [TabController minTabWidth]; 162 frame.size.width = [TabController minTabWidth];
163 frame.origin = NSMakePoint(0, 0); 163 frame.origin = NSMakePoint(0, 0);
164 [[controller view] setFrame:frame]; 164 [[controller view] setFrame:frame];
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 EXPECT_TRUE([controller shouldShowCloseBox]); 253 EXPECT_TRUE([controller shouldShowCloseBox]);
254 [controller setSelected:NO]; 254 [controller setSelected:NO];
255 EXPECT_TRUE([controller shouldShowIcon]); 255 EXPECT_TRUE([controller shouldShowIcon]);
256 EXPECT_TRUE([controller shouldShowCloseBox]); 256 EXPECT_TRUE([controller shouldShowCloseBox]);
257 257
258 cap = [controller iconCapacity]; 258 cap = [controller iconCapacity];
259 EXPECT_GT(cap, 0); 259 EXPECT_GT(cap, 0);
260 } 260 }
261 261
262 } // namespace 262 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698