| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ntp_tiles/icon_cacher_impl.h" | 5 #include "components/ntp_tiles/icon_cacher_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| 11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
| 13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 14 #include "base/test/mock_callback.h" | 14 #include "base/test/mock_callback.h" |
| 15 #include "base/test/test_simple_task_runner.h" | 15 #include "base/test/test_simple_task_runner.h" |
| 16 #include "base/threading/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
| 17 #include "components/favicon/core/favicon_client.h" | 17 #include "components/favicon/core/favicon_client.h" |
| 18 #include "components/favicon/core/favicon_service_impl.h" | 18 #include "components/favicon/core/favicon_service_impl.h" |
| 19 #include "components/favicon/core/favicon_util.h" | 19 #include "components/favicon/core/favicon_util.h" |
| 20 #include "components/history/core/browser/history_database_params.h" | 20 #include "components/history/core/browser/history_database_params.h" |
| 21 #include "components/history/core/browser/history_service.h" | 21 #include "components/history/core/browser/history_service.h" |
| 22 #include "components/image_fetcher/image_fetcher.h" | 22 #include "components/image_fetcher/core/image_fetcher.h" |
| 23 #include "components/image_fetcher/request_metadata.h" | 23 #include "components/image_fetcher/core/request_metadata.h" |
| 24 #include "testing/gmock/include/gmock/gmock.h" | 24 #include "testing/gmock/include/gmock/gmock.h" |
| 25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
| 26 #include "ui/base/resource/resource_bundle.h" | 26 #include "ui/base/resource/resource_bundle.h" |
| 27 #include "ui/base/ui_base_paths.h" | 27 #include "ui/base/ui_base_paths.h" |
| 28 #include "ui/gfx/image/image_unittest_util.h" | 28 #include "ui/gfx/image/image_unittest_util.h" |
| 29 | 29 |
| 30 using ::testing::_; | 30 using ::testing::_; |
| 31 using ::testing::Eq; | 31 using ::testing::Eq; |
| 32 using ::testing::Invoke; | 32 using ::testing::Invoke; |
| 33 using ::testing::InSequence; | 33 using ::testing::InSequence; |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 Eq(gfx::Size(64, 64))); // Compares dimensions, not objects. | 323 Eq(gfx::Size(64, 64))); // Compares dimensions, not objects. |
| 324 | 324 |
| 325 // Let the fetcher continue and wait for the second call of the callback. | 325 // Let the fetcher continue and wait for the second call of the callback. |
| 326 fetch_loop.Run(); // Wait for the updated image. | 326 fetch_loop.Run(); // Wait for the updated image. |
| 327 EXPECT_THAT(GetCachedIconFor(site_.url, favicon_base::TOUCH_ICON).Size(), | 327 EXPECT_THAT(GetCachedIconFor(site_.url, favicon_base::TOUCH_ICON).Size(), |
| 328 Eq(gfx::Size(128, 128))); // Compares dimensions, not objects. | 328 Eq(gfx::Size(128, 128))); // Compares dimensions, not objects. |
| 329 } | 329 } |
| 330 | 330 |
| 331 } // namespace | 331 } // namespace |
| 332 } // namespace ntp_tiles | 332 } // namespace ntp_tiles |
| OLD | NEW |