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

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

Issue 2698473004: Split FaviconService and FaviconServiceImpl. (Closed)
Patch Set: Revert changes in ios/.../history_collection_view_controller_unittest.mm Created 3 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
« no previous file with comments | « chrome/browser/favicon/favicon_service_factory.cc ('k') | components/favicon/content/BUILD.gn » ('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 #include "chrome/browser/ui/cocoa/history_menu_bridge.h" 5 #include "chrome/browser/ui/cocoa/history_menu_bridge.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include <initializer_list> 9 #include <initializer_list>
10 #include <memory> 10 #include <memory>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 NSMenu* HistoryMenu() override { return menu_.get(); } 48 NSMenu* HistoryMenu() override { return menu_.get(); }
49 49
50 private: 50 private:
51 base::scoped_nsobject<NSMenu> menu_; 51 base::scoped_nsobject<NSMenu> menu_;
52 }; 52 };
53 53
54 class HistoryMenuBridgeTest : public CocoaProfileTest { 54 class HistoryMenuBridgeTest : public CocoaProfileTest {
55 public: 55 public:
56 void SetUp() override { 56 void SetUp() override {
57 CocoaProfileTest::SetUp(); 57 CocoaProfileTest::SetUp();
58 ASSERT_TRUE(profile()->CreateHistoryService(/*delete_file=*/true,
59 /*no_db=*/false));
58 profile()->CreateFaviconService(); 60 profile()->CreateFaviconService();
59 bridge_.reset(new MockBridge(profile())); 61 bridge_.reset(new MockBridge(profile()));
60 } 62 }
61 63
62 // We are a friend of HistoryMenuBridge (and have access to 64 // We are a friend of HistoryMenuBridge (and have access to
63 // protected methods), but none of the classes generated by TEST_F() 65 // protected methods), but none of the classes generated by TEST_F()
64 // are. Wraps common commands. 66 // are. Wraps common commands.
65 void ClearMenuSection(NSMenu* menu, 67 void ClearMenuSection(NSMenu* menu,
66 NSInteger tag) { 68 NSInteger tag) {
67 bridge_->ClearMenuSection(menu, tag); 69 bridge_->ClearMenuSection(menu, tag);
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 image_result.image = gfx::Image::CreateFrom1xBitmap(bitmap); 364 image_result.image = gfx::Image::CreateFrom1xBitmap(bitmap);
363 GotFaviconData(&item, image_result); 365 GotFaviconData(&item, image_result);
364 366
365 // Make sure the callback works. 367 // Make sure the callback works.
366 EXPECT_FALSE(item.icon_requested); 368 EXPECT_FALSE(item.icon_requested);
367 EXPECT_TRUE(item.icon.get()); 369 EXPECT_TRUE(item.icon.get());
368 EXPECT_TRUE([item.menu_item image]); 370 EXPECT_TRUE([item.menu_item image]);
369 } 371 }
370 372
371 } // namespace 373 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/favicon/favicon_service_factory.cc ('k') | components/favicon/content/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698