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

Side by Side Diff: chrome/browser/component_updater/test/component_updater_service_unittest.h

Issue 55303002: Unittest for Component updater throttles (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITTEST _H_ 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITTEST _H_
6 #define CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITTEST _H_ 6 #define CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITTEST _H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 void SetLoopCount(int times); 84 void SetLoopCount(int times);
85 85
86 void SetRecheckTime(int seconds); 86 void SetRecheckTime(int seconds);
87 87
88 void SetOnDemandTime(int seconds); 88 void SetOnDemandTime(int seconds);
89 89
90 void SetComponentUpdateService(ComponentUpdateService* cus); 90 void SetComponentUpdateService(ComponentUpdateService* cus);
91 91
92 void SetQuitClosure(const base::Closure& quit_closure); 92 void SetQuitClosure(const base::Closure& quit_closure);
93 93
94 void SetInitialDelay(int seconds);
95
94 private: 96 private:
97 int initial_time_;
95 int times_; 98 int times_;
96 int recheck_time_; 99 int recheck_time_;
97 int ondemand_time_; 100 int ondemand_time_;
98 101
99 ComponentUpdateService* cus_; 102 ComponentUpdateService* cus_;
100 scoped_refptr<net::TestURLRequestContextGetter> context_; 103 scoped_refptr<net::TestURLRequestContextGetter> context_;
101 base::Closure quit_closure_; 104 base::Closure quit_closure_;
102 }; 105 };
103 106
104 class ComponentUpdaterTest : public testing::Test { 107 class ComponentUpdaterTest : public testing::Test {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 MOCK_METHOD2(OnEvent, void(Events event, int extra)); 175 MOCK_METHOD2(OnEvent, void(Events event, int extra));
173 }; 176 };
174 177
175 class OnDemandTester { 178 class OnDemandTester {
176 public: 179 public:
177 static ComponentUpdateService::Status OnDemand( 180 static ComponentUpdateService::Status OnDemand(
178 ComponentUpdateService* cus, const std::string& component_id); 181 ComponentUpdateService* cus, const std::string& component_id);
179 }; 182 };
180 183
181 #endif // CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITT EST_H_ 184 #endif // CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITT EST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698