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

Side by Side Diff: chrome/browser/extensions/apps_promo_unittest.cc

Issue 10698111: browser: Move more files into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/logging.h" 5 #include "base/logging.h"
6 #include "chrome/browser/browser_process.h" 6 #include "chrome/browser/browser_process.h"
7 #include "chrome/browser/extensions/apps_promo.h" 7 #include "chrome/browser/extensions/apps_promo.h"
8 #include "chrome/browser/prefs/browser_prefs.h" 8 #include "chrome/browser/prefs/browser_prefs.h"
9 #include "chrome/common/extensions/extension.h" 9 #include "chrome/common/extensions/extension.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 ScopedTestingLocalState local_state_; 42 ScopedTestingLocalState local_state_;
43 AppsPromo apps_promo_; 43 AppsPromo apps_promo_;
44 }; 44 };
45 45
46 ExtensionAppsPromo::ExtensionAppsPromo() 46 ExtensionAppsPromo::ExtensionAppsPromo()
47 : local_state_(static_cast<TestingBrowserProcess*>(g_browser_process)), 47 : local_state_(static_cast<TestingBrowserProcess*>(g_browser_process)),
48 apps_promo_(&prefs_) { 48 apps_promo_(&prefs_) {
49 } 49 }
50 50
51 void ExtensionAppsPromo::SetUp() { 51 void ExtensionAppsPromo::SetUp() {
52 browser::RegisterUserPrefs(&prefs_); 52 chrome::RegisterUserPrefs(&prefs_);
53 } 53 }
54 54
55 // TODO(dpolukhin): On Chrome OS all apps are installed via external extensions, 55 // TODO(dpolukhin): On Chrome OS all apps are installed via external extensions,
56 // and the web store promo is never shown. 56 // and the web store promo is never shown.
57 #if !defined(OS_CHROMEOS) 57 #if !defined(OS_CHROMEOS)
58 58
59 TEST_F(ExtensionAppsPromo, HappyPath) { 59 TEST_F(ExtensionAppsPromo, HappyPath) {
60 const extensions::ExtensionIdSet& default_app_ids = 60 const extensions::ExtensionIdSet& default_app_ids =
61 apps_promo()->old_default_apps(); 61 apps_promo()->old_default_apps();
62 62
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 EXPECT_TRUE(show_promo); 214 EXPECT_TRUE(show_promo);
215 215
216 // When the "hide" pref is true, the promo should NOT appear. 216 // When the "hide" pref is true, the promo should NOT appear.
217 prefs()->SetBoolean(prefs::kNtpHideWebStorePromo, true); 217 prefs()->SetBoolean(prefs::kNtpHideWebStorePromo, true);
218 show_promo = apps_promo()->ShouldShowPromo( 218 show_promo = apps_promo()->ShouldShowPromo(
219 apps_promo()->old_default_apps(), &just_expired); 219 apps_promo()->old_default_apps(), &just_expired);
220 EXPECT_FALSE(show_promo); 220 EXPECT_FALSE(show_promo);
221 } 221 }
222 222
223 #endif // OS_CHROMEOS 223 #endif // OS_CHROMEOS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698