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

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

Issue 251403002: Implement an observer for the component updater. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add asserts. Created 6 years, 8 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 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 private: 151 private:
152 TestConfigurator* test_config_; 152 TestConfigurator* test_config_;
153 base::FilePath test_data_dir_; 153 base::FilePath test_data_dir_;
154 content::TestBrowserThreadBundle thread_bundle_; 154 content::TestBrowserThreadBundle thread_bundle_;
155 scoped_ptr<ComponentUpdateService> component_updater_; 155 scoped_ptr<ComponentUpdateService> component_updater_;
156 }; 156 };
157 157
158 const char expected_crx_url[] = 158 const char expected_crx_url[] =
159 "http://localhost/download/jebgalgnebhfojomionfpkfelancnnkf.crx"; 159 "http://localhost/download/jebgalgnebhfojomionfpkfelancnnkf.crx";
160 160
161 class MockComponentObserver : public ComponentObserver { 161 class MockServiceObserver : public ServiceObserver {
162 public: 162 public:
163 MockComponentObserver(); 163 MockServiceObserver();
164 ~MockComponentObserver(); 164 ~MockServiceObserver();
165 MOCK_METHOD2(OnEvent, void(Events event, int extra)); 165 MOCK_METHOD2(OnEvent, void(Events event, const std::string&));
166 }; 166 };
167 167
168 class OnDemandTester { 168 class OnDemandTester {
169 public: 169 public:
170 static ComponentUpdateService::Status OnDemand( 170 static ComponentUpdateService::Status OnDemand(
171 ComponentUpdateService* cus, const std::string& component_id); 171 ComponentUpdateService* cus, const std::string& component_id);
172 }; 172 };
173 173
174 } // namespace component_updater 174 } // namespace component_updater
175 175
176 #endif // CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITT EST_H_ 176 #endif // CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITT EST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698