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

Side by Side Diff: chrome/installer/util/beacons_unittest.cc

Issue 1878313003: Convert //chrome/installer from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert decompress.cc in mini_installer. 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/installer/util/beacons.cc ('k') | chrome/installer/util/browser_distribution.h » ('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 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 "chrome/installer/util/beacons.h" 5 #include "chrome/installer/util/beacons.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/test/scoped_path_override.h" 10 #include "base/test/scoped_path_override.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 chrome_exe = chrome_exe.Append(installer::kInstallBinaryDir); 216 chrome_exe = chrome_exe.Append(installer::kInstallBinaryDir);
217 return chrome_exe.Append(installer::kChromeExe); 217 return chrome_exe.Append(installer::kChromeExe);
218 } 218 }
219 219
220 ScopedVector<base::ScopedPathOverride> path_overrides_; 220 ScopedVector<base::ScopedPathOverride> path_overrides_;
221 registry_util::RegistryOverrideManager registry_override_manager_; 221 registry_util::RegistryOverrideManager registry_override_manager_;
222 }; 222 };
223 223
224 // Tests that the default browser beacons work as expected. 224 // Tests that the default browser beacons work as expected.
225 TEST_P(DefaultBrowserBeaconTest, All) { 225 TEST_P(DefaultBrowserBeaconTest, All) {
226 scoped_ptr<Beacon> last_was_default(MakeLastWasDefaultBeacon( 226 std::unique_ptr<Beacon> last_was_default(MakeLastWasDefaultBeacon(
227 system_install_, distribution_->GetAppRegistrationData())); 227 system_install_, distribution_->GetAppRegistrationData()));
228 scoped_ptr<Beacon> first_not_default(MakeFirstNotDefaultBeacon( 228 std::unique_ptr<Beacon> first_not_default(MakeFirstNotDefaultBeacon(
229 system_install_, distribution_->GetAppRegistrationData())); 229 system_install_, distribution_->GetAppRegistrationData()));
230 230
231 ASSERT_TRUE(last_was_default->Get().is_null()); 231 ASSERT_TRUE(last_was_default->Get().is_null());
232 ASSERT_TRUE(first_not_default->Get().is_null()); 232 ASSERT_TRUE(first_not_default->Get().is_null());
233 233
234 // Chrome is not default. 234 // Chrome is not default.
235 UpdateDefaultBrowserBeaconWithState(chrome_exe_, distribution_, 235 UpdateDefaultBrowserBeaconWithState(chrome_exe_, distribution_,
236 ShellUtil::NOT_DEFAULT); 236 ShellUtil::NOT_DEFAULT);
237 ASSERT_TRUE(last_was_default->Get().is_null()); 237 ASSERT_TRUE(last_was_default->Get().is_null());
238 ASSERT_FALSE(first_not_default->Get().is_null()); 238 ASSERT_FALSE(first_not_default->Get().is_null());
(...skipping 29 matching lines...) Expand all
268 INSTANTIATE_TEST_CASE_P(UserLevelChrome, 268 INSTANTIATE_TEST_CASE_P(UserLevelChrome,
269 DefaultBrowserBeaconTest, 269 DefaultBrowserBeaconTest,
270 Values(DistributionVariant::USER_LEVEL)); 270 Values(DistributionVariant::USER_LEVEL));
271 #if 0 && defined(GOOGLE_CHROME_BUILD) 271 #if 0 && defined(GOOGLE_CHROME_BUILD)
272 // Disabled for now since InstallUtil::IsChromeSxSProcess makes this impossible. 272 // Disabled for now since InstallUtil::IsChromeSxSProcess makes this impossible.
273 INSTANTIATE_TEST_CASE_P(ChromeSxS, DefaultBrowserBeaconTest, 273 INSTANTIATE_TEST_CASE_P(ChromeSxS, DefaultBrowserBeaconTest,
274 Values(DistributionVariant::SXS)); 274 Values(DistributionVariant::SXS));
275 #endif 275 #endif
276 276
277 } // namespace installer_util 277 } // namespace installer_util
OLDNEW
« no previous file with comments | « chrome/installer/util/beacons.cc ('k') | chrome/installer/util/browser_distribution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698