OLD | NEW |
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/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 MockTRS(Profile* profile) : PersistentTabRestoreService(profile, NULL) {} | 29 MockTRS(Profile* profile) : PersistentTabRestoreService(profile, NULL) {} |
30 MOCK_CONST_METHOD0(entries, const TabRestoreService::Entries&()); | 30 MOCK_CONST_METHOD0(entries, const TabRestoreService::Entries&()); |
31 }; | 31 }; |
32 | 32 |
33 class MockBridge : public HistoryMenuBridge { | 33 class MockBridge : public HistoryMenuBridge { |
34 public: | 34 public: |
35 MockBridge(Profile* profile) | 35 MockBridge(Profile* profile) |
36 : HistoryMenuBridge(profile), | 36 : HistoryMenuBridge(profile), |
37 menu_([[NSMenu alloc] initWithTitle:@"History"]) {} | 37 menu_([[NSMenu alloc] initWithTitle:@"History"]) {} |
38 | 38 |
39 virtual NSMenu* HistoryMenu() { | 39 virtual NSMenu* HistoryMenu() OVERRIDE { |
40 return menu_.get(); | 40 return menu_.get(); |
41 } | 41 } |
42 | 42 |
43 private: | 43 private: |
44 scoped_nsobject<NSMenu> menu_; | 44 scoped_nsobject<NSMenu> menu_; |
45 }; | 45 }; |
46 | 46 |
47 class HistoryMenuBridgeTest : public CocoaProfileTest { | 47 class HistoryMenuBridgeTest : public CocoaProfileTest { |
48 public: | 48 public: |
49 | 49 |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 image_result.image = gfx::Image::CreateFrom1xBitmap(bitmap); | 354 image_result.image = gfx::Image::CreateFrom1xBitmap(bitmap); |
355 GotFaviconData(&item, image_result); | 355 GotFaviconData(&item, image_result); |
356 | 356 |
357 // Make sure the callback works. | 357 // Make sure the callback works. |
358 EXPECT_FALSE(item.icon_requested); | 358 EXPECT_FALSE(item.icon_requested); |
359 EXPECT_TRUE(item.icon.get()); | 359 EXPECT_TRUE(item.icon.get()); |
360 EXPECT_TRUE([item.menu_item image]); | 360 EXPECT_TRUE([item.menu_item image]); |
361 } | 361 } |
362 | 362 |
363 } // namespace | 363 } // namespace |
OLD | NEW |