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

Unified Diff: trunk/src/net/url_request/url_request_ftp_job_unittest.cc

Issue 12605011: Revert 188912 "Removed static factories for data, ftp, file, and..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/net/url_request/url_request_ftp_job.cc ('k') | trunk/src/net/url_request/url_request_http_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/net/url_request/url_request_ftp_job_unittest.cc
===================================================================
--- trunk/src/net/url_request/url_request_ftp_job_unittest.cc (revision 188924)
+++ trunk/src/net/url_request/url_request_ftp_job_unittest.cc (working copy)
@@ -6,13 +6,10 @@
#include "base/run_loop.h"
#include "net/proxy/proxy_config_service.h"
#include "net/socket/socket_test_util.h"
-#include "net/url_request/ftp_protocol_handler.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context.h"
-#include "net/url_request/url_request_job_factory_impl.h"
#include "net/url_request/url_request_status.h"
#include "net/url_request/url_request_test_util.h"
-#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
@@ -52,26 +49,15 @@
Observer* observer_;
};
-class MockFtpTransactionFactory : public FtpTransactionFactory {
- public:
- MOCK_METHOD0(CreateTransaction, FtpTransaction*());
- MOCK_METHOD1(Suspend, void(bool suspend));
-};
-
class FtpTestURLRequestContext : public TestURLRequestContext {
public:
FtpTestURLRequestContext(ClientSocketFactory* socket_factory,
ProxyService* proxy_service,
- NetworkDelegate* network_delegate,
- FtpTransactionFactory* ftp_transaction_factory)
+ NetworkDelegate* network_delegate)
: TestURLRequestContext(true) {
set_client_socket_factory(socket_factory);
context_storage_.set_proxy_service(proxy_service);
set_network_delegate(network_delegate);
- URLRequestJobFactoryImpl* job_factory = new URLRequestJobFactoryImpl;
- job_factory->SetProtocolHandler(
- "ftp", new FtpProtocolHandler(ftp_transaction_factory));
- context_storage_.set_job_factory(job_factory);
Init();
}
};
@@ -83,8 +69,7 @@
new SimpleProxyConfigService, NULL, NULL)),
request_context_(&socket_factory_,
proxy_service_,
- &network_delegate_,
- &ftp_transaction_factory_) {
+ &network_delegate_) {
}
virtual ~URLRequestFtpJobTest() {
@@ -114,7 +99,6 @@
ScopedVector<DeterministicSocketData> socket_data_;
DeterministicMockClientSocketFactory socket_factory_;
TestNetworkDelegate network_delegate_;
- ::testing::StrictMock<MockFtpTransactionFactory> ftp_transaction_factory_;
// Owned by |request_context_|:
ProxyService* proxy_service_;
« no previous file with comments | « trunk/src/net/url_request/url_request_ftp_job.cc ('k') | trunk/src/net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698