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

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

Issue 5915004: Introduce incognito preference settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespaces + fixes for trybot Created 10 years 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/default_apps_unittest.cc
diff --git a/chrome/browser/extensions/default_apps_unittest.cc b/chrome/browser/extensions/default_apps_unittest.cc
index 4fa9bc2c987e03b541e02e6517a4b0553aceabf8..be6dcdbef486fe45e87da469c6e24e9f760ef728 100644
--- a/chrome/browser/extensions/default_apps_unittest.cc
+++ b/chrome/browser/extensions/default_apps_unittest.cc
@@ -11,9 +11,10 @@
// and the web store promo is never shown.
#if !defined(OS_CHROMEOS)
TEST(ExtensionDefaultApps, Basics) {
- TestingPrefService pref_service;
- DefaultApps::RegisterUserPrefs(&pref_service);
- DefaultApps default_apps(&pref_service);
+ scoped_ptr<TestingPrefService> pref_service(
+ TestingPrefService::CreateTestingPrefService());
+ DefaultApps::RegisterUserPrefs(pref_service.get());
+ DefaultApps default_apps(pref_service.get());
ExtensionIdSet default_app_ids = *default_apps.GetAppsToInstall();
ASSERT_GT(default_app_ids.size(), 0u);
@@ -64,9 +65,10 @@ TEST(ExtensionDefaultApps, Basics) {
}
TEST(ExtensionDefaultApps, HidePromo) {
- TestingPrefService pref_service;
- DefaultApps::RegisterUserPrefs(&pref_service);
- DefaultApps default_apps(&pref_service);
+ scoped_ptr<TestingPrefService> pref_service(
+ TestingPrefService::CreateTestingPrefService());
+ DefaultApps::RegisterUserPrefs(pref_service.get());
+ DefaultApps default_apps(pref_service.get());
ExtensionIdSet default_app_ids = *default_apps.GetAppsToInstall();
default_apps.DidInstallApp(default_app_ids);
@@ -81,9 +83,10 @@ TEST(ExtensionDefaultApps, HidePromo) {
}
TEST(ExtensionDefaultApps, InstallingAnAppHidesPromo) {
- TestingPrefService pref_service;
- DefaultApps::RegisterUserPrefs(&pref_service);
- DefaultApps default_apps(&pref_service);
+ scoped_ptr<TestingPrefService> pref_service(
+ TestingPrefService::CreateTestingPrefService());
+ DefaultApps::RegisterUserPrefs(pref_service.get());
+ DefaultApps default_apps(pref_service.get());
ExtensionIdSet default_app_ids = *default_apps.GetAppsToInstall();
ExtensionIdSet installed_app_ids = default_app_ids;
@@ -109,9 +112,10 @@ TEST(ExtensionDefaultApps, ManualAppInstalledWhileInstallingDefaultApps) {
// In these cases, we should keep trying to install default apps until we have
// them all, and then stop, even if at that point, we have more apps than just
// the default ones.
- TestingPrefService pref_service;
- DefaultApps::RegisterUserPrefs(&pref_service);
- DefaultApps default_apps(&pref_service);
+ scoped_ptr<TestingPrefService> pref_service(
+ TestingPrefService::CreateTestingPrefService());
+ DefaultApps::RegisterUserPrefs(pref_service.get());
+ DefaultApps default_apps(pref_service.get());
// Simulate an app getting installed before the complete set of default apps.
// This shouldn't affect us installing default apps. We should keep trying.

Powered by Google App Engine
This is Rietveld 408576698