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

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

Issue 329031: CL which includes http://codereview.chromium.org/337006 for mrossetti... (Closed) Base URL: svn://chrome-svn/chrome/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/bookmark_name_folder_controller.mm ('k') | 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) 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_nsobject.h" 7 #include "base/scoped_nsobject.h"
8 #import "chrome/browser/cocoa/bookmark_name_folder_controller.h" 8 #import "chrome/browser/cocoa/bookmark_name_folder_controller.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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const BookmarkNode* parent = model->GetBookmarkBarNode(); 67 const BookmarkNode* parent = model->GetBookmarkBarNode();
68 const BookmarkNode* node = NULL; 68 const BookmarkNode* node = NULL;
69 EXPECT_EQ(0, parent->GetChildCount()); 69 EXPECT_EQ(0, parent->GetChildCount());
70 70
71 scoped_nsobject<BookmarkNameFolderController> 71 scoped_nsobject<BookmarkNameFolderController>
72 controller([[BookmarkNameFolderController alloc] 72 controller([[BookmarkNameFolderController alloc]
73 initWithParentWindow:cocoa_helper_.window() 73 initWithParentWindow:cocoa_helper_.window()
74 profile:helper_.profile() 74 profile:helper_.profile()
75 node:node]); 75 node:node]);
76 [controller window]; // force nib load 76 [controller window]; // force nib load
77 EXPECT_FALSE([[controller okButton] isEnabled]); 77
78 // We start enabled since the default "New Folder" is added for us.
79 EXPECT_TRUE([[controller okButton] isEnabled]);
78 80
79 [controller setFolderName:@"Bozo"]; 81 [controller setFolderName:@"Bozo"];
80 EXPECT_TRUE([[controller okButton] isEnabled]); 82 EXPECT_TRUE([[controller okButton] isEnabled]);
81 [controller setFolderName:@" "]; 83 [controller setFolderName:@" "];
82 EXPECT_TRUE([[controller okButton] isEnabled]); 84 EXPECT_TRUE([[controller okButton] isEnabled]);
83 85
84 [controller setFolderName:@""]; 86 [controller setFolderName:@""];
85 EXPECT_FALSE([[controller okButton] isEnabled]); 87 EXPECT_FALSE([[controller okButton] isEnabled]);
86 } 88 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/bookmark_name_folder_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698