Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: chrome/browser/ui/webui/fileicon_source_unittest.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/webui/fallback_icon_source.h ('k') | chrome/browser/ui/webui/flags_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/fallback_icon_source.h ('k') | chrome/browser/ui/webui/flags_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698