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

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

Issue 865163003: bookmarks: Move BookmarkNode into 'bookmarks' namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enhanced_bookmarks fix Created 5 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 9 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.h" 10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.h"
11 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" 11 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
12 #include "chrome/test/base/testing_profile.h" 12 #include "chrome/test/base/testing_profile.h"
13 #include "components/bookmarks/browser/bookmark_model.h" 13 #include "components/bookmarks/browser/bookmark_model.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 #import "testing/gtest_mac.h" 15 #import "testing/gtest_mac.h"
16 #include "testing/platform_test.h" 16 #include "testing/platform_test.h"
17 17
18 using base::ASCIIToUTF16; 18 using base::ASCIIToUTF16;
19 using bookmarks::BookmarkModel; 19 using bookmarks::BookmarkModel;
20 using bookmarks::BookmarkNode;
20 21
21 class BookmarkNameFolderControllerTest : public CocoaProfileTest { 22 class BookmarkNameFolderControllerTest : public CocoaProfileTest {
22 }; 23 };
23 24
24 25
25 // Simple add of a node (at the end). 26 // Simple add of a node (at the end).
26 TEST_F(BookmarkNameFolderControllerTest, AddNew) { 27 TEST_F(BookmarkNameFolderControllerTest, AddNew) {
27 BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile()); 28 BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
28 const BookmarkNode* parent = model->bookmark_bar_node(); 29 const BookmarkNode* parent = model->bookmark_bar_node();
29 EXPECT_EQ(0, parent->child_count()); 30 EXPECT_EQ(0, parent->child_count());
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 161
161 [controller setFolderName:@"Bozo"]; 162 [controller setFolderName:@"Bozo"];
162 EXPECT_TRUE([[controller okButton] isEnabled]); 163 EXPECT_TRUE([[controller okButton] isEnabled]);
163 [controller setFolderName:@" "]; 164 [controller setFolderName:@" "];
164 EXPECT_TRUE([[controller okButton] isEnabled]); 165 EXPECT_TRUE([[controller okButton] isEnabled]);
165 166
166 [controller setFolderName:@""]; 167 [controller setFolderName:@""];
167 EXPECT_TRUE([[controller okButton] isEnabled]); 168 EXPECT_TRUE([[controller okButton] isEnabled]);
168 } 169 }
169 170
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698