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

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

Issue 1342743002: Remove Profile and HostDesktopType dependencies from core TabRestore code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Mac Created 5 years, 3 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
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 12 matching lines...) Expand all
23 #import "testing/gtest_mac.h" 23 #import "testing/gtest_mac.h"
24 #include "third_party/skia/include/core/SkBitmap.h" 24 #include "third_party/skia/include/core/SkBitmap.h"
25 #include "ui/gfx/codec/png_codec.h" 25 #include "ui/gfx/codec/png_codec.h"
26 26
27 namespace { 27 namespace {
28 28
29 class MockTRS : public PersistentTabRestoreService { 29 class MockTRS : public PersistentTabRestoreService {
30 public: 30 public:
31 MockTRS(Profile* profile) 31 MockTRS(Profile* profile)
32 : PersistentTabRestoreService( 32 : PersistentTabRestoreService(
33 profile,
34 make_scoped_ptr(new ChromeTabRestoreServiceClient(profile)), 33 make_scoped_ptr(new ChromeTabRestoreServiceClient(profile)),
35 nullptr) {} 34 nullptr) {}
36 MOCK_CONST_METHOD0(entries, const TabRestoreService::Entries&()); 35 MOCK_CONST_METHOD0(entries, const TabRestoreService::Entries&());
37 }; 36 };
38 37
39 class MockBridge : public HistoryMenuBridge { 38 class MockBridge : public HistoryMenuBridge {
40 public: 39 public:
41 MockBridge(Profile* profile) 40 MockBridge(Profile* profile)
42 : HistoryMenuBridge(profile), 41 : HistoryMenuBridge(profile),
43 menu_([[NSMenu alloc] initWithTitle:@"History"]) {} 42 menu_([[NSMenu alloc] initWithTitle:@"History"]) {}
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 image_result.image = gfx::Image::CreateFrom1xBitmap(bitmap); 351 image_result.image = gfx::Image::CreateFrom1xBitmap(bitmap);
353 GotFaviconData(&item, image_result); 352 GotFaviconData(&item, image_result);
354 353
355 // Make sure the callback works. 354 // Make sure the callback works.
356 EXPECT_FALSE(item.icon_requested); 355 EXPECT_FALSE(item.icon_requested);
357 EXPECT_TRUE(item.icon.get()); 356 EXPECT_TRUE(item.icon.get());
358 EXPECT_TRUE([item.menu_item image]); 357 EXPECT_TRUE([item.menu_item image]);
359 } 358 }
360 359
361 } // namespace 360 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_tabrestore_browsertest.cc ('k') | chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698