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

Unified Diff: chrome/installer/util/product_unittest.cc

Issue 2618583005: Remove support for non-browser products from InstallationState and ProductState. (Closed)
Patch Set: sync to position 442664 Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/util/product_state_unittest.cc ('k') | chrome/installer/util/user_experiment.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/product_unittest.cc
diff --git a/chrome/installer/util/product_unittest.cc b/chrome/installer/util/product_unittest.cc
index 6adaf01e6ae33bcbabacd579d0777d5f7ea8a589..6763bc67f9ba5ed2bb67bc3c1b21e65a1260604f 100644
--- a/chrome/installer/util/product_unittest.cc
+++ b/chrome/installer/util/product_unittest.cc
@@ -61,8 +61,7 @@ TEST(ProductTest, ProductInstallBasic) {
// There should be no installed version in the registry.
machine_state.Initialize();
- EXPECT_TRUE(machine_state.GetProductState(
- system_level, distribution->GetType()) == NULL);
+ EXPECT_EQ(nullptr, machine_state.GetProductState(system_level));
// Let's pretend chrome is installed.
RegKey version_key(root, distribution->GetVersionKey().c_str(),
@@ -78,9 +77,9 @@ TEST(ProductTest, ProductInstallBasic) {
// We started out with a non-msi product.
machine_state.Initialize();
const installer::ProductState* chrome_state =
- machine_state.GetProductState(system_level, distribution->GetType());
- EXPECT_TRUE(chrome_state != NULL);
- if (chrome_state != NULL) {
+ machine_state.GetProductState(system_level);
+ EXPECT_NE(nullptr, chrome_state);
+ if (chrome_state) {
EXPECT_EQ(chrome_state->version(), current_version);
EXPECT_FALSE(chrome_state->is_msi());
}
@@ -94,10 +93,9 @@ TEST(ProductTest, ProductInstallBasic) {
// Set the MSI marker, refresh, and verify that we now see the MSI marker.
EXPECT_TRUE(product->SetMsiMarker(system_level, true));
machine_state.Initialize();
- chrome_state =
- machine_state.GetProductState(system_level, distribution->GetType());
- EXPECT_TRUE(chrome_state != NULL);
- if (chrome_state != NULL)
+ chrome_state = machine_state.GetProductState(system_level);
+ EXPECT_NE(nullptr, chrome_state);
+ if (chrome_state)
EXPECT_TRUE(chrome_state->is_msi());
}
}
« no previous file with comments | « chrome/installer/util/product_state_unittest.cc ('k') | chrome/installer/util/user_experiment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698