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

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

Issue 384105: Mac: Animate the bookmark bar showing/hiding. (Closed)
Patch Set: Comments added per rohitrao's review. Created 11 years, 1 month 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 | « chrome/browser/cocoa/toolbar_controller.mm ('k') | chrome/browser/cocoa/view_resizer_pong.mm » ('j') | 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) 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 #import "base/scoped_nsobject.h" 7 #import "base/scoped_nsobject.h"
8 #include "chrome/app/chrome_dll_resource.h" 8 #include "chrome/app/chrome_dll_resource.h"
9 #include "chrome/browser/cocoa/browser_test_helper.h" 9 #include "chrome/browser/cocoa/browser_test_helper.h"
10 #import "chrome/browser/cocoa/cocoa_test_helper.h" 10 #import "chrome/browser/cocoa/cocoa_test_helper.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 TEST_F(ToolbarControllerTest, PopulateEncodingMenu) { 290 TEST_F(ToolbarControllerTest, PopulateEncodingMenu) {
291 NSMenu* encodings = [[bar_ toolbarViews] objectAtIndex:kEncodingMenuIndex]; 291 NSMenu* encodings = [[bar_ toolbarViews] objectAtIndex:kEncodingMenuIndex];
292 292
293 // Can't check item strings because of localization, but the nib has zero 293 // Can't check item strings because of localization, but the nib has zero
294 // items so check that we at least populated the menu with something at 294 // items so check that we at least populated the menu with something at
295 // startup. 295 // startup.
296 EXPECT_NE(0, [encodings numberOfItems]); 296 EXPECT_NE(0, [encodings numberOfItems]);
297 } 297 }
298 298
299 TEST_F(ToolbarControllerTest, CorrectHeightWhenCompressed) { 299 TEST_F(ToolbarControllerTest, HeightCompression) {
300 [bar_ setShouldBeCompressed:YES]; 300 for (int i = 0; i <= 10; i++) {
301 EXPECT_EQ(30.0, [resizeDelegate_ height]); 301 [bar_ setHeightCompression:static_cast<CGFloat>(i)];
302 } 302 EXPECT_EQ(static_cast<CGFloat>(36 - i), [resizeDelegate_ height]);
303 303 }
304 TEST_F(ToolbarControllerTest, CorrectHeightWhenUnompressed) {
305 [bar_ setShouldBeCompressed:NO];
306 EXPECT_EQ(36.0, [resizeDelegate_ height]);
307 } 304 }
308 305
309 } // namespace 306 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/toolbar_controller.mm ('k') | chrome/browser/cocoa/view_resizer_pong.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698