From a405b4c6c34f1ab69f73df8ec7e7b58631a3167d Mon Sep 17 00:00:00 2001 From: "tommi@chromium.org" Date: Wed, 15 Dec 2010 21:05:32 +0000 Subject: Adding a new class, PackageProperties that represents the shared binaries for each of the products. Also removing the system_level() property out of the Product class and into the Package class as system_level can't be different for products that share the same package. TEST=Run installer and unit tests. BUG=61609 Review URL: http://codereview.chromium.org/5744001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69314 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/installer/util/product_unittest.cc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'chrome/installer/util/product_unittest.cc') diff --git a/chrome/installer/util/product_unittest.cc b/chrome/installer/util/product_unittest.cc index 4b73b7a..992bd4d 100644 --- a/chrome/installer/util/product_unittest.cc +++ b/chrome/installer/util/product_unittest.cc @@ -8,11 +8,15 @@ #include "base/scoped_handle.h" #include "chrome/installer/util/chrome_frame_distribution.h" #include "chrome/installer/util/google_update_constants.h" +#include "chrome/installer/util/package.h" +#include "chrome/installer/util/package_properties.h" #include "chrome/installer/util/master_preferences.h" #include "chrome/installer/util/product.h" using base::win::RegKey; using base::win::ScopedHandle; +using installer::ChromePackageProperties; +using installer::ChromiumPackageProperties; using installer::Package; using installer::Product; using installer::ProductPackageMapping; @@ -83,11 +87,11 @@ TEST_F(ProductTest, ProductInstallBasic) { BrowserDistribution* distribution = BrowserDistribution::GetSpecificDistribution( BrowserDistribution::CHROME_BROWSER, prefs); - scoped_refptr package(new Package(test_dir_.path())); - scoped_refptr product(new Product(distribution, system_level, - package.get())); + ChromePackageProperties properties; + scoped_refptr package(new Package(system_level, test_dir_.path(), + &properties)); + scoped_refptr product(new Product(distribution, package.get())); - EXPECT_EQ(system_level, product->system_level()); FilePath user_data(product->GetUserDataPath()); EXPECT_FALSE(user_data.empty()); EXPECT_NE(std::wstring::npos, @@ -115,8 +119,8 @@ TEST_F(ProductTest, ProductInstallBasic) { // Set the MSI marker, delete the objects, create new ones and verify // that we now see the MSI marker. EXPECT_TRUE(product->SetMsiMarker(true)); - package = new Package(test_dir_.path()); - product = new Product(distribution, system_level, package.get()); + package = new Package(system_level, test_dir_.path(), &properties); + product = new Product(distribution, package.get()); EXPECT_TRUE(product->IsMsi()); // See if WriteInstallerResult writes anything. -- cgit v1.1