OLD | NEW |
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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 | 264 |
265 class BookmarkBarControllerTestBase : public CocoaTest { | 265 class BookmarkBarControllerTestBase : public CocoaTest { |
266 public: | 266 public: |
267 BrowserTestHelper helper_; | 267 BrowserTestHelper helper_; |
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 BookmarkBarControllerTestBase() { | 271 BookmarkBarControllerTestBase() { |
272 FilePath extension_dir; | 272 FilePath extension_dir; |
273 helper_.profile()->CreateExtensionService(CommandLine::ForCurrentProcess(), | 273 helper_.profile()->CreateExtensionService(CommandLine::ForCurrentProcess(), |
274 extension_dir); | 274 extension_dir, false); |
275 resizeDelegate_.reset([[ViewResizerPong alloc] init]); | 275 resizeDelegate_.reset([[ViewResizerPong alloc] init]); |
276 NSRect parent_frame = NSMakeRect(0, 0, 800, 50); | 276 NSRect parent_frame = NSMakeRect(0, 0, 800, 50); |
277 parent_view_.reset([[NSView alloc] initWithFrame:parent_frame]); | 277 parent_view_.reset([[NSView alloc] initWithFrame:parent_frame]); |
278 [parent_view_ setHidden:YES]; | 278 [parent_view_ setHidden:YES]; |
279 } | 279 } |
280 | 280 |
281 void InstallAndToggleBar(BookmarkBarController* bar) { | 281 void InstallAndToggleBar(BookmarkBarController* bar) { |
282 // Force loading of the nib. | 282 // Force loading of the nib. |
283 [bar view]; | 283 [bar view]; |
284 // Awkwardness to look like we've been installed. | 284 // Awkwardness to look like we've been installed. |
(...skipping 1883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2168 "2f3b ] 4b "); | 2168 "2f3b ] 4b "); |
2169 actual = model_test_utils::ModelStringFromNode(root); | 2169 actual = model_test_utils::ModelStringFromNode(root); |
2170 EXPECT_EQ(expected, actual); | 2170 EXPECT_EQ(expected, actual); |
2171 | 2171 |
2172 // Verify that the other bookmark folder can't be deleted. | 2172 // Verify that the other bookmark folder can't be deleted. |
2173 BookmarkButton *otherButton = [bar_ otherBookmarksButton]; | 2173 BookmarkButton *otherButton = [bar_ otherBookmarksButton]; |
2174 EXPECT_FALSE([bar_ canDragBookmarkButtonToTrash:otherButton]); | 2174 EXPECT_FALSE([bar_ canDragBookmarkButtonToTrash:otherButton]); |
2175 } | 2175 } |
2176 | 2176 |
2177 } // namespace | 2177 } // namespace |
OLD | NEW |