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

Side by Side 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: Created 7 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 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 <vector> 5 #include <vector>
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 11 matching lines...) Expand all
22 #include "chrome/test/base/testing_profile.h" 22 #include "chrome/test/base/testing_profile.h"
23 #include "content/public/browser/notification_registrar.h" 23 #include "content/public/browser/notification_registrar.h"
24 #include "content/public/browser/notification_service.h" 24 #include "content/public/browser/notification_service.h"
25 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
26 26
27 #include "chrome/browser/web_resource/notification_promo_mobile_ntp.h" 27 #include "chrome/browser/web_resource/notification_promo_mobile_ntp.h"
28 28
29 class PromoResourceServiceMobileNtpTest : public testing::Test { 29 class PromoResourceServiceMobileNtpTest : public testing::Test {
30 public: 30 public:
31 PromoResourceServiceMobileNtpTest() 31 PromoResourceServiceMobileNtpTest()
32 : local_state_(static_cast<TestingBrowserProcess*>(g_browser_process)), 32 : local_state_(TestingBrowserProcess::GetGlobal()),
33 web_resource_service_(new PromoResourceService(&profile_)) { 33 web_resource_service_(new PromoResourceService(&profile_)) {
34 } 34 }
35 35
36 protected: 36 protected:
37 TestingProfile profile_; 37 TestingProfile profile_;
38 ScopedTestingLocalState local_state_; 38 ScopedTestingLocalState local_state_;
39 scoped_refptr<PromoResourceService> web_resource_service_; 39 scoped_refptr<PromoResourceService> web_resource_service_;
40 MessageLoop loop_; 40 MessageLoop loop_;
41 }; 41 };
42 42
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 "It\'s simple. Go http://www.google.com/chrome/", 191 "It\'s simple. Go http://www.google.com/chrome/",
192 "ACTION_EMAIL", "This is the body.", "XXX value"); 192 "ACTION_EMAIL", "This is the body.", "XXX value");
193 193
194 promo_test.InitPromoFromJson(true); 194 promo_test.InitPromoFromJson(true);
195 195
196 // Second time should not trigger a notification. 196 // Second time should not trigger a notification.
197 promo_test.InitPromoFromJson(false); 197 promo_test.InitPromoFromJson(false);
198 198
199 promo_test.TestInitFromPrefs(); 199 promo_test.TestInitFromPrefs();
200 } 200 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698