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

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

Issue 366029: Initial change for the implementation of browser actions on the mac.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/cocoa/toolbar_controller.mm ('k') | chrome/chrome.gyp » ('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 26 matching lines...) Expand all
37 37
38 namespace { 38 namespace {
39 39
40 class ToolbarControllerTest : public PlatformTest { 40 class ToolbarControllerTest : public PlatformTest {
41 public: 41 public:
42 42
43 // Indexes that match the ordering returned by the private ToolbarController 43 // Indexes that match the ordering returned by the private ToolbarController
44 // |-toolbarViews| method. 44 // |-toolbarViews| method.
45 enum { 45 enum {
46 kBackIndex, kForwardIndex, kReloadIndex, kHomeIndex, kStarIndex, kGoIndex, 46 kBackIndex, kForwardIndex, kReloadIndex, kHomeIndex, kStarIndex, kGoIndex,
47 kPageIndex, kWrenchIndex, kLocationIndex, kEncodingMenuIndex 47 kPageIndex, kWrenchIndex, kLocationIndex, kEncodingMenuIndex,
48 kBrowserActionContainerViewIndex
48 }; 49 };
49 50
50 ToolbarControllerTest() { 51 ToolbarControllerTest() {
51 Browser* browser = helper_.browser(); 52 Browser* browser = helper_.browser();
52 CommandUpdater* updater = browser->command_updater(); 53 CommandUpdater* updater = browser->command_updater();
53 // The default state for the commands is true, set a couple to false to 54 // The default state for the commands is true, set a couple to false to
54 // ensure they get picked up correct on initialization 55 // ensure they get picked up correct on initialization
55 updater->UpdateCommandEnabled(IDC_BACK, false); 56 updater->UpdateCommandEnabled(IDC_BACK, false);
56 updater->UpdateCommandEnabled(IDC_FORWARD, false); 57 updater->UpdateCommandEnabled(IDC_FORWARD, false);
57 resizeDelegate_.reset([[ViewResizerPong alloc] init]); 58 resizeDelegate_.reset([[ViewResizerPong alloc] init]);
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 [bar_ setShouldBeCompressed:YES]; 300 [bar_ setShouldBeCompressed:YES];
300 EXPECT_EQ(30.0, [resizeDelegate_ height]); 301 EXPECT_EQ(30.0, [resizeDelegate_ height]);
301 } 302 }
302 303
303 TEST_F(ToolbarControllerTest, CorrectHeightWhenUnompressed) { 304 TEST_F(ToolbarControllerTest, CorrectHeightWhenUnompressed) {
304 [bar_ setShouldBeCompressed:NO]; 305 [bar_ setShouldBeCompressed:NO];
305 EXPECT_EQ(36.0, [resizeDelegate_ height]); 306 EXPECT_EQ(36.0, [resizeDelegate_ height]);
306 } 307 }
307 308
308 } // namespace 309 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/toolbar_controller.mm ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698