OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/favicon/large_icon_cache.h" | 5 #include "ios/chrome/browser/favicon/large_icon_cache.h" |
6 | 6 |
| 7 #include "base/macros.h" |
7 #include "components/favicon_base/fallback_icon_style.h" | 8 #include "components/favicon_base/fallback_icon_style.h" |
8 #include "components/favicon_base/favicon_types.h" | 9 #include "components/favicon_base/favicon_types.h" |
9 #include "skia/ext/skia_utils_ios.h" | 10 #include "skia/ext/skia_utils_ios.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "ui/gfx/codec/png_codec.h" | 12 #include "ui/gfx/codec/png_codec.h" |
12 | 13 |
13 namespace { | 14 namespace { |
14 | 15 |
15 const char kDummyUrl[] = "http://www.example.com"; | 16 const char kDummyUrl[] = "http://www.example.com"; |
16 const char kDummyUrl2[] = "http://www.example2.com"; | 17 const char kDummyUrl2[] = "http://www.example2.com"; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // Test overwriting kDummyUrl. | 89 // Test overwriting kDummyUrl. |
89 large_icon_cache_->SetCachedResult(GURL(kDummyUrl), *expected_result2); | 90 large_icon_cache_->SetCachedResult(GURL(kDummyUrl), *expected_result2); |
90 scoped_ptr<favicon_base::LargeIconResult> result3 = | 91 scoped_ptr<favicon_base::LargeIconResult> result3 = |
91 large_icon_cache_->GetCachedResult(GURL(kDummyUrl2)); | 92 large_icon_cache_->GetCachedResult(GURL(kDummyUrl2)); |
92 EXPECT_EQ(false, result3->bitmap.is_valid()); | 93 EXPECT_EQ(false, result3->bitmap.is_valid()); |
93 EXPECT_EQ(expected_result2->fallback_icon_style->background_color, | 94 EXPECT_EQ(expected_result2->fallback_icon_style->background_color, |
94 result3->fallback_icon_style->background_color); | 95 result3->fallback_icon_style->background_color); |
95 } | 96 } |
96 | 97 |
97 } // namespace | 98 } // namespace |
OLD | NEW |