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

Unified Diff: chrome/browser/extensions/extension_service_unittest.cc

Issue 2054773002: Replace the WAS_INSTALLED_BY_CUSTODIAN creation flag with a pref (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing the build Created 4 years, 6 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
Index: chrome/browser/extensions/extension_service_unittest.cc
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index 5849ecab1138306f4fda018fd87ff4cce9dc424c..2e97c4e0b89af975b8804b8226ed912bfb6f0607 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -2736,7 +2736,6 @@ TEST_F(ExtensionServiceTest, AddPendingExtensionFromSync) {
const std::string kFakeId(all_zero);
const GURL kFakeUpdateURL("http:://fake.update/url");
const bool kFakeRemoteInstall(false);
- const bool kFakeInstalledByCustodian(false);
EXPECT_TRUE(
service()->pending_extension_manager()->AddFromSync(
@@ -2744,8 +2743,7 @@ TEST_F(ExtensionServiceTest, AddPendingExtensionFromSync) {
kFakeUpdateURL,
base::Version(),
&IsExtension,
- kFakeRemoteInstall,
- kFakeInstalledByCustodian));
+ kFakeRemoteInstall));
const extensions::PendingExtensionInfo* pending_extension_info;
ASSERT_TRUE((pending_extension_info =
@@ -2770,7 +2768,6 @@ const char kGoodUpdateURL[] = "http://good.update/url";
const char kGoodVersion[] = "1";
const bool kGoodIsFromSync = true;
const bool kGoodRemoteInstall = false;
-const bool kGoodInstalledByCustodian = false;
} // namespace
// Test installing a pending extension (this goes through
@@ -2783,8 +2780,7 @@ TEST_F(ExtensionServiceTest, UpdatePendingExtension) {
GURL(kGoodUpdateURL),
base::Version(kGoodVersion),
&IsExtension,
- kGoodRemoteInstall,
- kGoodInstalledByCustodian));
+ kGoodRemoteInstall));
EXPECT_TRUE(service()->pending_extension_manager()->IsIdPending(kGoodId));
base::FilePath path = data_dir().AppendASCII("good.crx");
@@ -2807,8 +2803,7 @@ TEST_F(ExtensionServiceTest, UpdatePendingExtensionWrongVersion) {
GURL(kGoodUpdateURL),
other_version,
&IsExtension,
- kGoodRemoteInstall,
- kGoodInstalledByCustodian));
+ kGoodRemoteInstall));
EXPECT_TRUE(service()->pending_extension_manager()->IsIdPending(kGoodId));
base::FilePath path = data_dir().AppendASCII("good.crx");
@@ -2839,7 +2834,7 @@ bool IsTheme(const Extension* extension) {
TEST_F(ExtensionServiceTest, DISABLED_UpdatePendingTheme) {
InitializeEmptyExtensionService();
EXPECT_TRUE(service()->pending_extension_manager()->AddFromSync(
- theme_crx, GURL(), base::Version(), &IsTheme, false, false));
+ theme_crx, GURL(), base::Version(), &IsTheme, false));
EXPECT_TRUE(service()->pending_extension_manager()->IsIdPending(theme_crx));
base::FilePath path = data_dir().AppendASCII("theme.crx");
@@ -2904,8 +2899,7 @@ TEST_F(ExtensionServiceTest, UpdatePendingExternalCrxWinsOverSync) {
GURL(kGoodUpdateURL),
base::Version(),
&IsExtension,
- kGoodRemoteInstall,
- kGoodInstalledByCustodian));
+ kGoodRemoteInstall));
// Check that there is a pending crx, with is_from_sync set to true.
const extensions::PendingExtensionInfo* pending_extension_info;
@@ -2936,8 +2930,7 @@ TEST_F(ExtensionServiceTest, UpdatePendingExternalCrxWinsOverSync) {
GURL(kGoodUpdateURL),
base::Version(),
&IsExtension,
- kGoodRemoteInstall,
- kGoodInstalledByCustodian));
+ kGoodRemoteInstall));
// Check that the external, non-sync update was not overridden.
ASSERT_TRUE((pending_extension_info =
@@ -2952,7 +2945,7 @@ TEST_F(ExtensionServiceTest, UpdatePendingExternalCrxWinsOverSync) {
TEST_F(ExtensionServiceTest, UpdatePendingCrxThemeMismatch) {
InitializeEmptyExtensionService();
EXPECT_TRUE(service()->pending_extension_manager()->AddFromSync(
- theme_crx, GURL(), base::Version(), &IsExtension, false, false));
+ theme_crx, GURL(), base::Version(), &IsExtension, false));
EXPECT_TRUE(service()->pending_extension_manager()->IsIdPending(theme_crx));
@@ -2979,8 +2972,7 @@ TEST_F(ExtensionServiceTest, UpdatePendingExtensionFailedShouldInstallTest) {
GURL(kGoodUpdateURL),
base::Version(),
&IsTheme,
- kGoodRemoteInstall,
- kGoodInstalledByCustodian));
+ kGoodRemoteInstall));
EXPECT_TRUE(service()->pending_extension_manager()->IsIdPending(kGoodId));
base::FilePath path = data_dir().AppendASCII("good.crx");
@@ -3025,7 +3017,6 @@ TEST_F(ExtensionServiceTest, UpdatePendingExtensionAlreadyInstalled) {
&IsExtension,
kGoodIsFromSync,
Manifest::INTERNAL,
- Extension::NO_FLAGS,
false,
kGoodRemoteInstall);
UpdateExtension(good->id(), path, ENABLED);
@@ -6020,8 +6011,7 @@ class ExtensionSourcePriorityTest : public ExtensionServiceTest {
GURL(kGoodUpdateURL),
base::Version(),
&IsExtension,
- kGoodRemoteInstall,
- kGoodInstalledByCustodian);
+ kGoodRemoteInstall);
}
// Fake a policy install.
« no previous file with comments | « chrome/browser/extensions/extension_service_sync_unittest.cc ('k') | chrome/browser/extensions/extension_sync_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698