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

Side by Side Diff: chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol Created 7 years, 6 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) 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 #include <vector> 6 #include <vector>
7 7
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 24 matching lines...) Expand all
35 public: 35 public:
36 MockBridge(Profile* profile) 36 MockBridge(Profile* profile)
37 : HistoryMenuBridge(profile), 37 : HistoryMenuBridge(profile),
38 menu_([[NSMenu alloc] initWithTitle:@"History"]) {} 38 menu_([[NSMenu alloc] initWithTitle:@"History"]) {}
39 39
40 virtual NSMenu* HistoryMenu() OVERRIDE { 40 virtual NSMenu* HistoryMenu() OVERRIDE {
41 return menu_.get(); 41 return menu_.get();
42 } 42 }
43 43
44 private: 44 private:
45 scoped_nsobject<NSMenu> menu_; 45 base::scoped_nsobject<NSMenu> menu_;
46 }; 46 };
47 47
48 class HistoryMenuBridgeTest : public CocoaProfileTest { 48 class HistoryMenuBridgeTest : public CocoaProfileTest {
49 public: 49 public:
50 50
51 virtual void SetUp() { 51 virtual void SetUp() {
52 CocoaProfileTest::SetUp(); 52 CocoaProfileTest::SetUp();
53 profile()->CreateFaviconService(); 53 profile()->CreateFaviconService();
54 bridge_.reset(new MockBridge(profile())); 54 bridge_.reset(new MockBridge(profile()));
55 } 55 }
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 image_result.image = gfx::Image::CreateFrom1xBitmap(bitmap); 356 image_result.image = gfx::Image::CreateFrom1xBitmap(bitmap);
357 GotFaviconData(&item, image_result); 357 GotFaviconData(&item, image_result);
358 358
359 // Make sure the callback works. 359 // Make sure the callback works.
360 EXPECT_FALSE(item.icon_requested); 360 EXPECT_FALSE(item.icon_requested);
361 EXPECT_TRUE(item.icon.get()); 361 EXPECT_TRUE(item.icon.get());
362 EXPECT_TRUE([item.menu_item image]); 362 EXPECT_TRUE([item.menu_item image]);
363 } 363 }
364 364
365 } // namespace 365 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698