| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/product_unittest.h" | 5 #include "chrome/installer/util/product_unittest.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/scoped_handle.h" | |
| 9 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/installer/util/chrome_frame_distribution.h" | 9 #include "chrome/installer/util/chrome_frame_distribution.h" |
| 11 #include "chrome/installer/util/google_update_constants.h" | 10 #include "chrome/installer/util/google_update_constants.h" |
| 12 #include "chrome/installer/util/installation_state.h" | 11 #include "chrome/installer/util/installation_state.h" |
| 13 #include "chrome/installer/util/package.h" | 12 #include "chrome/installer/util/package.h" |
| 14 #include "chrome/installer/util/package_properties.h" | 13 #include "chrome/installer/util/package_properties.h" |
| 15 #include "chrome/installer/util/master_preferences.h" | 14 #include "chrome/installer/util/master_preferences.h" |
| 16 #include "chrome/installer/util/product.h" | 15 #include "chrome/installer/util/product.h" |
| 17 | 16 |
| 18 using base::win::RegKey; | 17 using base::win::RegKey; |
| 19 using base::win::ScopedHandle; | |
| 20 using installer::ChromePackageProperties; | 18 using installer::ChromePackageProperties; |
| 21 using installer::ChromiumPackageProperties; | 19 using installer::ChromiumPackageProperties; |
| 22 using installer::Package; | 20 using installer::Package; |
| 23 using installer::Product; | 21 using installer::Product; |
| 24 using installer::ProductPackageMapping; | 22 using installer::ProductPackageMapping; |
| 25 using installer::MasterPreferences; | 23 using installer::MasterPreferences; |
| 26 | 24 |
| 27 void TestWithTempDir::SetUp() { | 25 void TestWithTempDir::SetUp() { |
| 28 // Name a subdirectory of the user temp directory. | 26 // Name a subdirectory of the user temp directory. |
| 29 ASSERT_TRUE(test_dir_.CreateUniqueTempDir()); | 27 ASSERT_TRUE(test_dir_.CreateUniqueTempDir()); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 192 |
| 195 installs.AddDistribution(BrowserDistribution::CHROME_BROWSER, prefs); | 193 installs.AddDistribution(BrowserDistribution::CHROME_BROWSER, prefs); |
| 196 FakeChromeFrameDistribution fake_chrome_frame(prefs); | 194 FakeChromeFrameDistribution fake_chrome_frame(prefs); |
| 197 installs.AddDistribution(&fake_chrome_frame); | 195 installs.AddDistribution(&fake_chrome_frame); |
| 198 EXPECT_EQ(2U, installs.products().size()); | 196 EXPECT_EQ(2U, installs.products().size()); |
| 199 // Since our fake Chrome Frame distribution class is reporting the same | 197 // Since our fake Chrome Frame distribution class is reporting the same |
| 200 // installation directory as Chrome, we should have only one package object. | 198 // installation directory as Chrome, we should have only one package object. |
| 201 EXPECT_EQ(1U, installs.packages().size()); | 199 EXPECT_EQ(1U, installs.packages().size()); |
| 202 EXPECT_EQ(multi_install, installs.packages()[0]->multi_install()); | 200 EXPECT_EQ(multi_install, installs.packages()[0]->multi_install()); |
| 203 } | 201 } |
| OLD | NEW |