| 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/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| 11 #include "base/strings/sys_string_conversions.h" | 11 #include "base/strings/sys_string_conversions.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "chrome/app/chrome_command_ids.h" | 13 #include "chrome/app/chrome_command_ids.h" |
| 14 #include "chrome/browser/common/cancelable_request.h" | 14 #include "chrome/browser/common/cancelable_request.h" |
| 15 #include "chrome/browser/favicon/favicon_types.h" | |
| 16 #include "chrome/browser/sessions/persistent_tab_restore_service.h" | 15 #include "chrome/browser/sessions/persistent_tab_restore_service.h" |
| 17 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" | 16 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" |
| 18 #include "chrome/browser/ui/cocoa/history_menu_bridge.h" | 17 #include "chrome/browser/ui/cocoa/history_menu_bridge.h" |
| 18 #include "chrome/common/favicon/favicon_types.h" |
| 19 #include "components/sessions/serialized_navigation_entry_test_helper.h" | 19 #include "components/sessions/serialized_navigation_entry_test_helper.h" |
| 20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 #import "testing/gtest_mac.h" | 22 #import "testing/gtest_mac.h" |
| 23 #include "third_party/skia/include/core/SkBitmap.h" | 23 #include "third_party/skia/include/core/SkBitmap.h" |
| 24 #include "ui/gfx/codec/png_codec.h" | 24 #include "ui/gfx/codec/png_codec.h" |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 class MockTRS : public PersistentTabRestoreService { | 28 class MockTRS : public PersistentTabRestoreService { |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |