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

Unified Diff: chrome/browser/component_updater/test/component_updater_service_unittest.h

Issue 74893002: Changed the update protocol for component updater from v2 to v3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed feedback from cdn@ 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/component_updater/test/component_updater_service_unittest.h
diff --git a/chrome/browser/component_updater/test/component_updater_service_unittest.h b/chrome/browser/component_updater/test/component_updater_service_unittest.h
index 6409c457876b1e0fc5704008011fa68d809ce7b0..d7d4946d3e18e9345dfd2811021f9b3af5c9be75 100644
--- a/chrome/browser/component_updater/test/component_updater_service_unittest.h
+++ b/chrome/browser/component_updater/test/component_updater_service_unittest.h
@@ -19,6 +19,7 @@
#include "chrome/browser/component_updater/test/component_patcher_mock.h"
#include "chrome/browser/component_updater/test/url_request_post_interceptor.h"
#include "content/public/test/test_browser_thread_bundle.h"
+#include "content/test/net/url_request_prepackaged_interceptor.h"
#include "net/url_request/url_request_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -27,7 +28,10 @@ class TestInstaller;
namespace component_updater {
-// Intercepts HTTP POST requests sent to |localhost2|.
+// Intercepts HTTP GET requests sent to "localhost".
+typedef content::URLLocalHostRequestPrepackagedInterceptor GetInterceptor;
+
+// Intercepts HTTP POST requests sent to "localhost2".
class InterceptorFactory : public URLRequestPostInterceptorFactory {
public:
InterceptorFactory();
@@ -148,7 +152,9 @@ class ComponentUpdaterTest : public testing::Test {
void RunThreadsUntilIdle();
scoped_ptr<component_updater::InterceptorFactory> interceptor_factory_;
+ URLRequestPostInterceptor* post_interceptor_; // Owned by the factory.
+ scoped_ptr<GetInterceptor> get_interceptor_;
private:
TestConfigurator* test_config_;
base::FilePath test_data_dir_;

Powered by Google App Engine
This is Rietveld 408576698