| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |