| Index: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm
|
| diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm
|
| index 77699289ac63e347e5c31b5dd31f3df8d04befd5..0301ba33efa6a267f1df6613855d3a5c6112c433 100644
|
| --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm
|
| +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm
|
| @@ -6,7 +6,7 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/command_line.h"
|
| -#include "base/memory/scoped_nsobject.h"
|
| +#include "base/mac/scoped_nsobject.h"
|
| #include "base/strings/string16.h"
|
| #include "base/strings/string_util.h"
|
| #include "base/strings/sys_string_conversions.h"
|
| @@ -30,8 +30,8 @@
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #import "testing/gtest_mac.h"
|
| #include "testing/platform_test.h"
|
| -#include "third_party/ocmock/gtest_support.h"
|
| #import "third_party/ocmock/OCMock/OCMock.h"
|
| +#include "third_party/ocmock/gtest_support.h"
|
| #include "ui/base/cocoa/animation_utils.h"
|
| #include "ui/base/test/cocoa_test_event_utils.h"
|
| #include "ui/base/theme_provider.h"
|
| @@ -204,7 +204,7 @@
|
| class FakeTheme : public ui::ThemeProvider {
|
| public:
|
| FakeTheme(NSColor* color) : color_(color) {}
|
| - scoped_nsobject<NSColor> color_;
|
| + base::scoped_nsobject<NSColor> color_;
|
|
|
| virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const OVERRIDE {
|
| return NULL;
|
| @@ -292,8 +292,8 @@ namespace {
|
|
|
| class BookmarkBarControllerTestBase : public CocoaProfileTest {
|
| public:
|
| - scoped_nsobject<NSView> parent_view_;
|
| - scoped_nsobject<ViewResizerPong> resizeDelegate_;
|
| + base::scoped_nsobject<NSView> parent_view_;
|
| + base::scoped_nsobject<ViewResizerPong> resizeDelegate_;
|
|
|
| virtual void SetUp() {
|
| CocoaProfileTest::SetUp();
|
| @@ -335,8 +335,8 @@ class BookmarkBarControllerTestBase : public CocoaProfileTest {
|
|
|
| class BookmarkBarControllerTest : public BookmarkBarControllerTestBase {
|
| public:
|
| - scoped_nsobject<NSButtonCell> cell_;
|
| - scoped_nsobject<BookmarkBarControllerNoOpen> bar_;
|
| + base::scoped_nsobject<NSButtonCell> cell_;
|
| + base::scoped_nsobject<BookmarkBarControllerNoOpen> bar_;
|
|
|
| virtual void SetUp() {
|
| BookmarkBarControllerTestBase::SetUp();
|
| @@ -496,7 +496,7 @@ TEST_F(BookmarkBarControllerTest, StateChanges) {
|
|
|
| // Make sure we're watching for frame change notifications.
|
| TEST_F(BookmarkBarControllerTest, FrameChangeNotification) {
|
| - scoped_nsobject<BookmarkBarControllerTogglePong> bar;
|
| + base::scoped_nsobject<BookmarkBarControllerTogglePong> bar;
|
| bar.reset(
|
| [[BookmarkBarControllerTogglePong alloc]
|
| initWithBrowser:browser()
|
| @@ -731,9 +731,10 @@ TEST_F(BookmarkBarControllerTest, OpenBookmark) {
|
| GURL gurl("http://walla.walla.ding.dong.com");
|
| scoped_ptr<BookmarkNode> node(new BookmarkNode(gurl));
|
|
|
| - scoped_nsobject<BookmarkButtonCell> cell([[BookmarkButtonCell alloc] init]);
|
| + base::scoped_nsobject<BookmarkButtonCell> cell(
|
| + [[BookmarkButtonCell alloc] init]);
|
| [cell setBookmarkNode:node.get()];
|
| - scoped_nsobject<BookmarkButton> button([[BookmarkButton alloc] init]);
|
| + base::scoped_nsobject<BookmarkButton> button([[BookmarkButton alloc] init]);
|
| [button setCell:cell.get()];
|
| [cell setRepresentedObject:[NSValue valueWithPointer:node.get()]];
|
|
|
| @@ -830,7 +831,7 @@ TEST_F(BookmarkBarControllerTest, TestButtonLimits) {
|
| // Make sure that each button we add marches to the right and does not
|
| // overlap with the previous one.
|
| TEST_F(BookmarkBarControllerTest, TestButtonMarch) {
|
| - scoped_nsobject<NSMutableArray> cells([[NSMutableArray alloc] init]);
|
| + base::scoped_nsobject<NSMutableArray> cells([[NSMutableArray alloc] init]);
|
|
|
| CGFloat widths[] = { 10, 10, 100, 10, 500, 500, 80000, 60000, 1, 345 };
|
| for (unsigned int i = 0; i < arraysize(widths); i++) {
|
| @@ -1168,7 +1169,7 @@ TEST_F(BookmarkBarControllerTest, TestClearOnDealloc) {
|
| bookmark_utils::AddIfNotBookmarked(model, gurls[i], titles[i]);
|
|
|
| // Get and retain the buttons so we can examine them after dealloc.
|
| - scoped_nsobject<NSArray> buttons([[bar_ buttons] retain]);
|
| + base::scoped_nsobject<NSArray> buttons([[bar_ buttons] retain]);
|
| EXPECT_EQ([buttons count], arraysize(titles));
|
|
|
| // Make sure that everything is set.
|
| @@ -1702,9 +1703,9 @@ class BookmarkBarControllerNotificationTest : public CocoaProfileTest {
|
| // Do not add the bar to a window, yet.
|
| }
|
|
|
| - scoped_nsobject<NSView> parent_view_;
|
| - scoped_nsobject<ViewResizerPong> resizeDelegate_;
|
| - scoped_nsobject<BookmarkBarControllerNotificationPong> bar_;
|
| + base::scoped_nsobject<NSView> parent_view_;
|
| + base::scoped_nsobject<ViewResizerPong> resizeDelegate_;
|
| + base::scoped_nsobject<BookmarkBarControllerNotificationPong> bar_;
|
| };
|
|
|
| TEST_F(BookmarkBarControllerNotificationTest, DeregistersForNotifications) {
|
| @@ -1740,7 +1741,7 @@ TEST_F(BookmarkBarControllerNotificationTest, DeregistersForNotifications) {
|
|
|
| class BookmarkBarControllerDragDropTest : public BookmarkBarControllerTestBase {
|
| public:
|
| - scoped_nsobject<BookmarkBarControllerDragData> bar_;
|
| + base::scoped_nsobject<BookmarkBarControllerDragData> bar_;
|
|
|
| virtual void SetUp() {
|
| BookmarkBarControllerTestBase::SetUp();
|
| @@ -1891,7 +1892,7 @@ TEST_F(BookmarkBarControllerDragDropTest, DragBookmarkData) {
|
| // Gen up some dragging data.
|
| const BookmarkNode* newNode = other->GetChild(2);
|
| [bar_ setDragDataNode:newNode];
|
| - scoped_nsobject<FakeDragInfo> dragInfo([[FakeDragInfo alloc] init]);
|
| + base::scoped_nsobject<FakeDragInfo> dragInfo([[FakeDragInfo alloc] init]);
|
| [dragInfo setDropLocation:[targetButton center]];
|
| [bar_ dragBookmarkData:(id<NSDraggingInfo>)dragInfo.get()];
|
|
|
|
|