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

Side by Side Diff: chrome/browser/web_resource/promo_resource_service_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 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 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 <utility> 5 #include <utility>
6 #include <vector> 6 #include <vector>
7 7
8 #include "apps/pref_names.h" 8 #include "apps/pref_names.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 class PromoResourceServiceTest : public testing::Test { 60 class PromoResourceServiceTest : public testing::Test {
61 public: 61 public:
62 // |promo_resource_service_| must be created after |local_state_|. 62 // |promo_resource_service_| must be created after |local_state_|.
63 PromoResourceServiceTest() 63 PromoResourceServiceTest()
64 : local_state_(TestingBrowserProcess::GetGlobal()), 64 : local_state_(TestingBrowserProcess::GetGlobal()),
65 promo_resource_service_(new PromoResourceService) {} 65 promo_resource_service_(new PromoResourceService) {}
66 66
67 protected: 67 protected:
68 ScopedTestingLocalState local_state_; 68 ScopedTestingLocalState local_state_;
69 scoped_refptr<PromoResourceService> promo_resource_service_; 69 scoped_refptr<PromoResourceService> promo_resource_service_;
70 MessageLoop loop_; 70 base::MessageLoop loop_;
71 }; 71 };
72 72
73 class NotificationPromoTest { 73 class NotificationPromoTest {
74 public: 74 public:
75 NotificationPromoTest() 75 NotificationPromoTest()
76 : received_notification_(false), 76 : received_notification_(false),
77 start_(0.0), 77 start_(0.0),
78 end_(0.0), 78 end_(0.0),
79 num_groups_(0), 79 num_groups_(0),
80 initial_segment_(0), 80 initial_segment_(0),
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 "}", 572 "}",
573 "What do you think of Chrome?", 573 "What do you think of Chrome?",
574 // The starting date is in 1999 to make tests pass 574 // The starting date is in 1999 to make tests pass
575 // on Android devices with incorrect or unset date/time. 575 // on Android devices with incorrect or unset date/time.
576 933672366, // unix epoch for 3 Aug 1999 9:26:06 GMT. 576 933672366, // unix epoch for 3 Aug 1999 9:26:06 GMT.
577 1000, 200, 100, 3600, 400, 30); 577 1000, 200, 100, 3600, 400, 30);
578 promo_test.InitPromoFromJson(true); 578 promo_test.InitPromoFromJson(true);
579 local_state_.Get()->SetBoolean(apps::prefs::kAppLauncherIsEnabled, true); 579 local_state_.Get()->SetBoolean(apps::prefs::kAppLauncherIsEnabled, true);
580 EXPECT_FALSE(promo_test.promo().CanShow()); 580 EXPECT_FALSE(promo_test.promo().CanShow());
581 } 581 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698