| 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 #include "base/macros.h" | 5 #include "base/macros.h" |
| 6 #include "base/memory/ref_counted_memory.h" | 6 #include "base/memory/ref_counted_memory.h" |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/icon_manager.h" | 9 #include "chrome/browser/icon_manager.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 } // namespace | 106 } // namespace |
| 107 | 107 |
| 108 TEST_F(FileIconSourceTest, FileIconSource_Parse) { | 108 TEST_F(FileIconSourceTest, FileIconSource_Parse) { |
| 109 std::vector<ui::ScaleFactor> supported_scale_factors; | 109 std::vector<ui::ScaleFactor> supported_scale_factors; |
| 110 supported_scale_factors.push_back(ui::SCALE_FACTOR_100P); | 110 supported_scale_factors.push_back(ui::SCALE_FACTOR_100P); |
| 111 supported_scale_factors.push_back(ui::SCALE_FACTOR_200P); | 111 supported_scale_factors.push_back(ui::SCALE_FACTOR_200P); |
| 112 ui::test::ScopedSetSupportedScaleFactors scoped_supported( | 112 ui::test::ScopedSetSupportedScaleFactors scoped_supported( |
| 113 supported_scale_factors); | 113 supported_scale_factors); |
| 114 | 114 |
| 115 for (unsigned i = 0; i < arraysize(kBasicExpectations); i++) { | 115 for (unsigned i = 0; i < arraysize(kBasicExpectations); i++) { |
| 116 scoped_ptr<TestFileIconSource> source(CreateFileIconSource()); | 116 std::unique_ptr<TestFileIconSource> source(CreateFileIconSource()); |
| 117 content::URLDataSource::GotDataCallback callback; | 117 content::URLDataSource::GotDataCallback callback; |
| 118 EXPECT_CALL(*source.get(), | 118 EXPECT_CALL(*source.get(), |
| 119 FetchFileIcon( | 119 FetchFileIcon( |
| 120 base::FilePath(kBasicExpectations[i].unescaped_path), | 120 base::FilePath(kBasicExpectations[i].unescaped_path), |
| 121 kBasicExpectations[i].scale_factor, | 121 kBasicExpectations[i].scale_factor, |
| 122 kBasicExpectations[i].size, CallbackIsNull())); | 122 kBasicExpectations[i].size, CallbackIsNull())); |
| 123 source->StartDataRequest(kBasicExpectations[i].request_path, -1, -1, | 123 source->StartDataRequest(kBasicExpectations[i].request_path, -1, -1, |
| 124 callback); | 124 callback); |
| 125 } | 125 } |
| 126 } | 126 } |
| OLD | NEW |