OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/enhanced_bookmarks/image_store.h" | 5 #include "components/enhanced_bookmarks/image_store.h" |
6 | 6 |
7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
8 | 8 |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/mac/scoped_cftyperef.h" | 10 #include "base/mac/scoped_cftyperef.h" |
| 11 #include "base/macros.h" |
11 #include "components/enhanced_bookmarks/image_record.h" | 12 #include "components/enhanced_bookmarks/image_record.h" |
12 #include "components/enhanced_bookmarks/image_store_util.h" | 13 #include "components/enhanced_bookmarks/image_store_util.h" |
13 #include "components/enhanced_bookmarks/persistent_image_store.h" | 14 #include "components/enhanced_bookmarks/persistent_image_store.h" |
14 #include "components/enhanced_bookmarks/test_image_store.h" | 15 #include "components/enhanced_bookmarks/test_image_store.h" |
15 #include "testing/platform_test.h" | 16 #include "testing/platform_test.h" |
16 #include "ui/gfx/geometry/size.h" | 17 #include "ui/gfx/geometry/size.h" |
17 #include "ui/gfx/image/image.h" | 18 #include "ui/gfx/image/image.h" |
18 #include "url/gurl.h" | 19 #include "url/gurl.h" |
19 | 20 |
20 namespace { | 21 namespace { |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 scoped_refptr<enhanced_bookmarks::ImageRecord> image_out = | 152 scoped_refptr<enhanced_bookmarks::ImageRecord> image_out = |
152 this->store_->Get(url); | 153 this->store_->Get(url); |
153 | 154 |
154 EXPECT_EQ(image_in->url, image_out->url); | 155 EXPECT_EQ(image_in->url, image_out->url); |
155 EXPECT_TRUE(CompareImages(*image_in->image, *image_out->image)); | 156 EXPECT_TRUE(CompareImages(*image_in->image, *image_out->image)); |
156 EXPECT_EQ(image_in->dominant_color, image_out->dominant_color); | 157 EXPECT_EQ(image_in->dominant_color, image_out->dominant_color); |
157 } | 158 } |
158 } | 159 } |
159 | 160 |
160 } // namespace | 161 } // namespace |
OLD | NEW |