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

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

Issue 9583036: Revert 124817 - 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, 9 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
« no previous file with comments | « chrome/browser/translate/translate_manager_browsertest.cc ('k') | chrome/chrome_browser.gypi » ('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) 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/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"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/sys_string_conversions.h" 12 #include "base/sys_string_conversions.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "chrome/browser/bookmarks/bookmark_model.h" 14 #include "chrome/browser/bookmarks/bookmark_model.h"
15 #include "chrome/browser/bookmarks/bookmark_utils.h" 15 #include "chrome/browser/bookmarks/bookmark_utils.h"
16 #include "chrome/browser/extensions/extension_system_factory.h"
17 #include "chrome/browser/extensions/test_extension_system.h"
18 #import "chrome/browser/ui/cocoa/animation_utils.h" 16 #import "chrome/browser/ui/cocoa/animation_utils.h"
19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h" 17 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h"
20 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" 18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
21 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.h" 19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.h"
22 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_unittest_helper.h" 20 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_unittest_helper.h"
23 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view.h" 21 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view.h"
24 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" 22 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h"
25 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h" 23 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h"
26 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu.h" 24 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu.h"
27 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" 25 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 class BookmarkBarControllerTestBase : public CocoaProfileTest { 265 class BookmarkBarControllerTestBase : public CocoaProfileTest {
268 public: 266 public:
269 scoped_nsobject<NSView> parent_view_; 267 scoped_nsobject<NSView> parent_view_;
270 scoped_nsobject<ViewResizerPong> resizeDelegate_; 268 scoped_nsobject<ViewResizerPong> resizeDelegate_;
271 269
272 virtual void SetUp() { 270 virtual void SetUp() {
273 CocoaProfileTest::SetUp(); 271 CocoaProfileTest::SetUp();
274 ASSERT_TRUE(profile()); 272 ASSERT_TRUE(profile());
275 273
276 FilePath extension_dir; 274 FilePath extension_dir;
277 static_cast<TestExtensionSystem*>( 275 profile()->CreateExtensionService(CommandLine::ForCurrentProcess(),
278 ExtensionSystemFactory::GetForProfile(profile()))-> 276 extension_dir, false);
279 CreateExtensionService(
280 CommandLine::ForCurrentProcess(),
281 extension_dir, false);
282 resizeDelegate_.reset([[ViewResizerPong alloc] init]); 277 resizeDelegate_.reset([[ViewResizerPong alloc] init]);
283 NSRect parent_frame = NSMakeRect(0, 0, 800, 50); 278 NSRect parent_frame = NSMakeRect(0, 0, 800, 50);
284 parent_view_.reset([[NSView alloc] initWithFrame:parent_frame]); 279 parent_view_.reset([[NSView alloc] initWithFrame:parent_frame]);
285 [parent_view_ setHidden:YES]; 280 [parent_view_ setHidden:YES];
286 } 281 }
287 282
288 void InstallAndToggleBar(BookmarkBarController* bar) { 283 void InstallAndToggleBar(BookmarkBarController* bar) {
289 // Force loading of the nib. 284 // Force loading of the nib.
290 [bar view]; 285 [bar view];
291 // Awkwardness to look like we've been installed. 286 // Awkwardness to look like we've been installed.
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after
2186 "2f3b ] 4b "); 2181 "2f3b ] 4b ");
2187 actual = model_test_utils::ModelStringFromNode(root); 2182 actual = model_test_utils::ModelStringFromNode(root);
2188 EXPECT_EQ(expected, actual); 2183 EXPECT_EQ(expected, actual);
2189 2184
2190 // Verify that the other bookmark folder can't be deleted. 2185 // Verify that the other bookmark folder can't be deleted.
2191 BookmarkButton *otherButton = [bar_ otherBookmarksButton]; 2186 BookmarkButton *otherButton = [bar_ otherBookmarksButton];
2192 EXPECT_FALSE([bar_ canDragBookmarkButtonToTrash:otherButton]); 2187 EXPECT_FALSE([bar_ canDragBookmarkButtonToTrash:otherButton]);
2193 } 2188 }
2194 2189
2195 } // namespace 2190 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/translate/translate_manager_browsertest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698