summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util/product_unittest.cc
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 21:05:32 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 21:05:32 +0000
commita405b4c6c34f1ab69f73df8ec7e7b58631a3167d (patch)
treecf10c39f8e09e4cd417f762ed72e6d1a809be202 /chrome/installer/util/product_unittest.cc
parent61e78f1855792814e87a777df59595edc9b163fe (diff)
downloadchromium_src-a405b4c6c34f1ab69f73df8ec7e7b58631a3167d.zip
chromium_src-a405b4c6c34f1ab69f73df8ec7e7b58631a3167d.tar.gz
chromium_src-a405b4c6c34f1ab69f73df8ec7e7b58631a3167d.tar.bz2
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
Diffstat (limited to 'chrome/installer/util/product_unittest.cc')
-rw-r--r--chrome/installer/util/product_unittest.cc16
1 files changed, 10 insertions, 6 deletions
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> package(new Package(test_dir_.path()));
- scoped_refptr<Product> product(new Product(distribution, system_level,
- package.get()));
+ ChromePackageProperties properties;
+ scoped_refptr<Package> package(new Package(system_level, test_dir_.path(),
+ &properties));
+ scoped_refptr<Product> 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.