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

Unified Diff: chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc

Issue 11759019: Update other unittests to use newly added TestingBrowserProcess::GetGlobal(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simpler codez Created 7 years, 12 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/web_resource/promo_resource_service_mobile_ntp_unittest.cc
diff --git a/chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc b/chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc
index 0ed340bc47d4b8e21f0c097ec7dd90fe1c10aa5c..44910d8f49dbbc39882e626eb895935b9e5a489f 100644
--- a/chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc
+++ b/chrome/browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc
@@ -25,13 +25,10 @@
class PromoResourceServiceMobileNtpTest : public testing::Test {
public:
+ // |promo_resource_service_| must be created after |local_state_|.
PromoResourceServiceMobileNtpTest()
- : local_state_(static_cast<TestingBrowserProcess*>(g_browser_process)) {
- static_cast<TestingBrowserProcess*>(g_browser_process)->SetLocalState(
- local_state_.Get());
- // |promo_resource_service_| must be created after local state is set.
- promo_resource_service_ = new PromoResourceService;
- }
+ : local_state_(TestingBrowserProcess::GetGlobal()),
+ promo_resource_service_(new PromoResourceService) {}
protected:
ScopedTestingLocalState local_state_;
@@ -41,8 +38,7 @@ class PromoResourceServiceMobileNtpTest : public testing::Test {
class NotificationPromoMobileNtpTest {
public:
- NotificationPromoMobileNtpTest() : received_notification_(false) {
- }
+ NotificationPromoMobileNtpTest() : received_notification_(false) {}
void Init(const std::string& json,
const std::string& promo_text,

Powered by Google App Engine
This is Rietveld 408576698