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

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

Issue 9369013: Take extensions out of Profile into a profile-keyed service, ExtensionSystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_nsobject.h" 9 #include "base/memory/scoped_nsobject.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 class BookmarkBarControllerTestBase : public CocoaProfileTest { 266 class BookmarkBarControllerTestBase : public CocoaProfileTest {
267 public: 267 public:
268 scoped_nsobject<NSView> parent_view_; 268 scoped_nsobject<NSView> parent_view_;
269 scoped_nsobject<ViewResizerPong> resizeDelegate_; 269 scoped_nsobject<ViewResizerPong> resizeDelegate_;
270 270
271 virtual void SetUp() { 271 virtual void SetUp() {
272 CocoaProfileTest::SetUp(); 272 CocoaProfileTest::SetUp();
273 ASSERT_TRUE(profile()); 273 ASSERT_TRUE(profile());
274 274
275 FilePath extension_dir; 275 FilePath extension_dir;
276 profile()->CreateExtensionService(CommandLine::ForCurrentProcess(), 276 static_cast<TestExtensionSystem*>(
277 extension_dir, false); 277 ExtensionSystemFactory::GetForProfile(profile()))->
278 CreateExtensionService(
279 CommandLine::ForCurrentProcess(),
280 extension_dir, false);
278 resizeDelegate_.reset([[ViewResizerPong alloc] init]); 281 resizeDelegate_.reset([[ViewResizerPong alloc] init]);
279 NSRect parent_frame = NSMakeRect(0, 0, 800, 50); 282 NSRect parent_frame = NSMakeRect(0, 0, 800, 50);
280 parent_view_.reset([[NSView alloc] initWithFrame:parent_frame]); 283 parent_view_.reset([[NSView alloc] initWithFrame:parent_frame]);
281 [parent_view_ setHidden:YES]; 284 [parent_view_ setHidden:YES];
282 } 285 }
283 286
284 void InstallAndToggleBar(BookmarkBarController* bar) { 287 void InstallAndToggleBar(BookmarkBarController* bar) {
285 // Force loading of the nib. 288 // Force loading of the nib.
286 [bar view]; 289 [bar view];
287 // Awkwardness to look like we've been installed. 290 // Awkwardness to look like we've been installed.
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after
2182 "2f3b ] 4b "); 2185 "2f3b ] 4b ");
2183 actual = model_test_utils::ModelStringFromNode(root); 2186 actual = model_test_utils::ModelStringFromNode(root);
2184 EXPECT_EQ(expected, actual); 2187 EXPECT_EQ(expected, actual);
2185 2188
2186 // Verify that the other bookmark folder can't be deleted. 2189 // Verify that the other bookmark folder can't be deleted.
2187 BookmarkButton *otherButton = [bar_ otherBookmarksButton]; 2190 BookmarkButton *otherButton = [bar_ otherBookmarksButton];
2188 EXPECT_FALSE([bar_ canDragBookmarkButtonToTrash:otherButton]); 2191 EXPECT_FALSE([bar_ canDragBookmarkButtonToTrash:otherButton]);
2189 } 2192 }
2190 2193
2191 } // namespace 2194 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698