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

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
« no previous file with comments | « no previous file | chrome/browser/component_updater/test/component_updater_service_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 void SetLoopCount(int times); 102 void SetLoopCount(int times);
103 103
104 void SetRecheckTime(int seconds); 104 void SetRecheckTime(int seconds);
105 105
106 void SetOnDemandTime(int seconds); 106 void SetOnDemandTime(int seconds);
107 107
108 void SetComponentUpdateService(ComponentUpdateService* cus); 108 void SetComponentUpdateService(ComponentUpdateService* cus);
109 109
110 void SetQuitClosure(const base::Closure& quit_closure); 110 void SetQuitClosure(const base::Closure& quit_closure);
111 111
112 void SetInitialDelay(int seconds);
113
112 private: 114 private:
115 int initial_time_;
113 int times_; 116 int times_;
114 int recheck_time_; 117 int recheck_time_;
115 int ondemand_time_; 118 int ondemand_time_;
116 119
117 ComponentUpdateService* cus_; 120 ComponentUpdateService* cus_;
118 scoped_refptr<net::TestURLRequestContextGetter> context_; 121 scoped_refptr<net::TestURLRequestContextGetter> context_;
119 base::Closure quit_closure_; 122 base::Closure quit_closure_;
120 }; 123 };
121 124
122 class ComponentUpdaterTest : public testing::Test { 125 class ComponentUpdaterTest : public testing::Test {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 } // namespace component_updater 184 } // namespace component_updater
182 185
183 #endif // CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITT EST_H_ 186 #endif // CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITT EST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/component_updater/test/component_updater_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698