OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/ref_counted_memory.h" | 8 #include "base/ref_counted_memory.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/app/chrome_command_ids.h" | 12 #include "chrome/app/chrome_command_ids.h" |
13 #include "chrome/browser/cancelable_request.h" | 13 #include "chrome/browser/cancelable_request.h" |
14 #include "chrome/browser/sessions/tab_restore_service.h" | 14 #include "chrome/browser/sessions/tab_restore_service.h" |
15 #include "chrome/browser/ui/cocoa/browser_test_helper.h" | 15 #include "chrome/browser/ui/cocoa/browser_test_helper.h" |
16 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 16 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
17 #include "chrome/browser/ui/cocoa/history_menu_bridge.h" | 17 #include "chrome/browser/ui/cocoa/history_menu_bridge.h" |
18 #include "gfx/codec/png_codec.h" | |
19 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
21 #import "testing/gtest_mac.h" | 20 #import "testing/gtest_mac.h" |
| 21 #include "ui/gfx/codec/png_codec.h" |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 class MockTRS : public TabRestoreService { | 25 class MockTRS : public TabRestoreService { |
26 public: | 26 public: |
27 MockTRS(Profile* profile) : TabRestoreService(profile, NULL) {} | 27 MockTRS(Profile* profile) : TabRestoreService(profile, NULL) {} |
28 MOCK_CONST_METHOD0(entries, const TabRestoreService::Entries&()); | 28 MOCK_CONST_METHOD0(entries, const TabRestoreService::Entries&()); |
29 }; | 29 }; |
30 | 30 |
31 class MockBridge : public HistoryMenuBridge { | 31 class MockBridge : public HistoryMenuBridge { |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 // Pretend to be called back. | 376 // Pretend to be called back. |
377 GotFaviconData(item.icon_handle, true, bytes, false, GURL()); | 377 GotFaviconData(item.icon_handle, true, bytes, false, GURL()); |
378 | 378 |
379 // Make sure the callback works. | 379 // Make sure the callback works. |
380 EXPECT_FALSE(item.icon_requested); | 380 EXPECT_FALSE(item.icon_requested); |
381 EXPECT_TRUE(item.icon.get()); | 381 EXPECT_TRUE(item.icon.get()); |
382 EXPECT_TRUE([item.menu_item image]); | 382 EXPECT_TRUE([item.menu_item image]); |
383 } | 383 } |
384 | 384 |
385 } // namespace | 385 } // namespace |
OLD | NEW |