| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/net/connection_tester.h" | 5 #include "chrome/browser/net/connection_tester.h" |
| 6 | 6 |
| 7 #include "base/prefs/testing_pref_service.h" | 7 #include "base/prefs/testing_pref_service.h" |
| 8 #include "content/public/browser/cookie_store_factory.h" |
| 8 #include "content/public/test/test_browser_thread.h" | 9 #include "content/public/test/test_browser_thread.h" |
| 9 #include "content/public/browser/cookie_store_factory.h" | 10 #include "content/public/browser/cookie_store_factory.h" |
| 10 #include "net/cert/mock_cert_verifier.h" | 11 #include "net/cert/mock_cert_verifier.h" |
| 11 #include "net/dns/mock_host_resolver.h" | 12 #include "net/dns/mock_host_resolver.h" |
| 12 #include "net/ftp/ftp_network_layer.h" | 13 #include "net/ftp/ftp_network_layer.h" |
| 13 #include "net/http/http_auth_handler_factory.h" | 14 #include "net/http/http_auth_handler_factory.h" |
| 14 #include "net/http/http_network_layer.h" | 15 #include "net/http/http_network_layer.h" |
| 15 #include "net/http/http_network_session.h" | 16 #include "net/http/http_network_session.h" |
| 16 #include "net/http/http_server_properties_impl.h" | 17 #include "net/http/http_server_properties_impl.h" |
| 17 #include "net/http/transport_security_state.h" | 18 #include "net/http/transport_security_state.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 session_params.http_server_properties = | 142 session_params.http_server_properties = |
| 142 http_server_properties_impl_.GetWeakPtr(); | 143 http_server_properties_impl_.GetWeakPtr(); |
| 143 scoped_refptr<net::HttpNetworkSession> network_session( | 144 scoped_refptr<net::HttpNetworkSession> network_session( |
| 144 new net::HttpNetworkSession(session_params)); | 145 new net::HttpNetworkSession(session_params)); |
| 145 http_transaction_factory_.reset( | 146 http_transaction_factory_.reset( |
| 146 new net::HttpNetworkLayer(network_session.get())); | 147 new net::HttpNetworkLayer(network_session.get())); |
| 147 proxy_script_fetcher_context_->set_http_transaction_factory( | 148 proxy_script_fetcher_context_->set_http_transaction_factory( |
| 148 http_transaction_factory_.get()); | 149 http_transaction_factory_.get()); |
| 149 // In-memory cookie store. | 150 // In-memory cookie store. |
| 150 proxy_script_fetcher_context_->set_cookie_store( | 151 proxy_script_fetcher_context_->set_cookie_store( |
| 151 content::CreateInMemoryCookieStore(NULL)); | 152 content::CreateCookieStore(content::CookieStoreConfig())); |
| 152 } | 153 } |
| 153 }; | 154 }; |
| 154 | 155 |
| 155 TEST_F(ConnectionTesterTest, RunAllTests) { | 156 TEST_F(ConnectionTesterTest, RunAllTests) { |
| 156 ASSERT_TRUE(test_server_.Start()); | 157 ASSERT_TRUE(test_server_.Start()); |
| 157 | 158 |
| 158 ConnectionTester tester(&test_delegate_, | 159 ConnectionTester tester(&test_delegate_, |
| 159 proxy_script_fetcher_context_.get(), | 160 proxy_script_fetcher_context_.get(), |
| 160 NULL); | 161 NULL); |
| 161 | 162 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 // net::ClientSocketPoolBaseHelper, since the "Group" holds a pointer | 210 // net::ClientSocketPoolBaseHelper, since the "Group" holds a pointer |
| 210 // |backup_task| that it will try to deref during the destructor, but | 211 // |backup_task| that it will try to deref during the destructor, but |
| 211 // depending on the order that pending tasks were deleted in, it might | 212 // depending on the order that pending tasks were deleted in, it might |
| 212 // already be invalid! See http://crbug.com/43291. | 213 // already be invalid! See http://crbug.com/43291. |
| 213 base::MessageLoop::current()->PostTask(FROM_HERE, | 214 base::MessageLoop::current()->PostTask(FROM_HERE, |
| 214 base::MessageLoop::QuitClosure()); | 215 base::MessageLoop::QuitClosure()); |
| 215 base::MessageLoop::current()->Run(); | 216 base::MessageLoop::current()->Run(); |
| 216 } | 217 } |
| 217 | 218 |
| 218 } // namespace | 219 } // namespace |
| OLD | NEW |