| 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <shlobj.h> | 9 #include <shlobj.h> |
| 10 #endif | 10 #endif |
| (...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1361 explicit LocalHttpTestServer(const FilePath& document_root) | 1361 explicit LocalHttpTestServer(const FilePath& document_root) |
| 1362 : TestServer(TestServer::TYPE_HTTP, | 1362 : TestServer(TestServer::TYPE_HTTP, |
| 1363 ScopedCustomUrlRequestTestHttpHost::value(), | 1363 ScopedCustomUrlRequestTestHttpHost::value(), |
| 1364 document_root) {} | 1364 document_root) {} |
| 1365 LocalHttpTestServer() | 1365 LocalHttpTestServer() |
| 1366 : TestServer(TestServer::TYPE_HTTP, | 1366 : TestServer(TestServer::TYPE_HTTP, |
| 1367 ScopedCustomUrlRequestTestHttpHost::value(), | 1367 ScopedCustomUrlRequestTestHttpHost::value(), |
| 1368 FilePath()) {} | 1368 FilePath()) {} |
| 1369 }; | 1369 }; |
| 1370 | 1370 |
| 1371 TEST_F(URLRequestTest, FLAKY_DelayedCookieCallback) { | 1371 TEST_F(URLRequestTest, DISABLED_DelayedCookieCallback) { |
| 1372 LocalHttpTestServer test_server; | 1372 LocalHttpTestServer test_server; |
| 1373 ASSERT_TRUE(test_server.Start()); | 1373 ASSERT_TRUE(test_server.Start()); |
| 1374 | 1374 |
| 1375 TestURLRequestContext context; | 1375 TestURLRequestContext context; |
| 1376 scoped_refptr<DelayedCookieMonster> delayed_cm = | 1376 scoped_refptr<DelayedCookieMonster> delayed_cm = |
| 1377 new DelayedCookieMonster(); | 1377 new DelayedCookieMonster(); |
| 1378 scoped_refptr<CookieStore> cookie_store = delayed_cm; | 1378 scoped_refptr<CookieStore> cookie_store = delayed_cm; |
| 1379 context.set_cookie_store(delayed_cm); | 1379 context.set_cookie_store(delayed_cm); |
| 1380 | 1380 |
| 1381 // Set up a cookie. | 1381 // Set up a cookie. |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2046 } | 2046 } |
| 2047 | 2047 |
| 2048 LocalHttpTestServer test_server_; | 2048 LocalHttpTestServer test_server_; |
| 2049 }; | 2049 }; |
| 2050 | 2050 |
| 2051 // In this unit test, we're using the HTTPTestServer as a proxy server and | 2051 // In this unit test, we're using the HTTPTestServer as a proxy server and |
| 2052 // issuing a CONNECT request with the magic host name "www.redirect.com". | 2052 // issuing a CONNECT request with the magic host name "www.redirect.com". |
| 2053 // The HTTPTestServer will return a 302 response, which we should not | 2053 // The HTTPTestServer will return a 302 response, which we should not |
| 2054 // follow. | 2054 // follow. |
| 2055 // flaky: crbug.com/96594 | 2055 // flaky: crbug.com/96594 |
| 2056 TEST_F(URLRequestTestHTTP, FLAKY_ProxyTunnelRedirectTest) { | 2056 TEST_F(URLRequestTestHTTP, DISABLED_ProxyTunnelRedirectTest) { |
| 2057 ASSERT_TRUE(test_server_.Start()); | 2057 ASSERT_TRUE(test_server_.Start()); |
| 2058 | 2058 |
| 2059 TestNetworkDelegate network_delegate; // Must outlive URLRequest. | 2059 TestNetworkDelegate network_delegate; // Must outlive URLRequest. |
| 2060 TestURLRequestContextWithProxy context( | 2060 TestURLRequestContextWithProxy context( |
| 2061 test_server_.host_port_pair().ToString(), | 2061 test_server_.host_port_pair().ToString(), |
| 2062 &network_delegate); | 2062 &network_delegate); |
| 2063 | 2063 |
| 2064 TestDelegate d; | 2064 TestDelegate d; |
| 2065 { | 2065 { |
| 2066 URLRequest r(GURL("https://www.redirect.com/"), &d, &context); | 2066 URLRequest r(GURL("https://www.redirect.com/"), &d, &context); |
| (...skipping 2775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4842 public: | 4842 public: |
| 4843 URLRequestTestFTP() | 4843 URLRequestTestFTP() |
| 4844 : test_server_(TestServer::TYPE_FTP, TestServer::kLocalhost, FilePath()) { | 4844 : test_server_(TestServer::TYPE_FTP, TestServer::kLocalhost, FilePath()) { |
| 4845 } | 4845 } |
| 4846 | 4846 |
| 4847 protected: | 4847 protected: |
| 4848 TestServer test_server_; | 4848 TestServer test_server_; |
| 4849 }; | 4849 }; |
| 4850 | 4850 |
| 4851 // Make sure an FTP request using an unsafe ports fails. | 4851 // Make sure an FTP request using an unsafe ports fails. |
| 4852 TEST_F(URLRequestTestFTP, FLAKY_UnsafePort) { | 4852 TEST_F(URLRequestTestFTP, DISABLED_UnsafePort) { |
| 4853 ASSERT_TRUE(test_server_.Start()); | 4853 ASSERT_TRUE(test_server_.Start()); |
| 4854 | 4854 |
| 4855 URLRequestJobFactoryImpl job_factory; | 4855 URLRequestJobFactoryImpl job_factory; |
| 4856 | 4856 |
| 4857 GURL url("ftp://127.0.0.1:7"); | 4857 GURL url("ftp://127.0.0.1:7"); |
| 4858 FtpProtocolHandler ftp_protocol_handler( | 4858 FtpProtocolHandler ftp_protocol_handler( |
| 4859 default_context_.ftp_transaction_factory(), | 4859 default_context_.ftp_transaction_factory(), |
| 4860 default_context_.ftp_auth_cache()); | 4860 default_context_.ftp_auth_cache()); |
| 4861 job_factory.SetProtocolHandler( | 4861 job_factory.SetProtocolHandler( |
| 4862 "ftp", | 4862 "ftp", |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5188 | 5188 |
| 5189 EXPECT_FALSE(r.is_pending()); | 5189 EXPECT_FALSE(r.is_pending()); |
| 5190 EXPECT_EQ(1, d->response_started_count()); | 5190 EXPECT_EQ(1, d->response_started_count()); |
| 5191 EXPECT_FALSE(d->received_data_before_response()); | 5191 EXPECT_FALSE(d->received_data_before_response()); |
| 5192 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); | 5192 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); |
| 5193 } | 5193 } |
| 5194 } | 5194 } |
| 5195 #endif // !defined(DISABLE_FTP_SUPPORT) | 5195 #endif // !defined(DISABLE_FTP_SUPPORT) |
| 5196 | 5196 |
| 5197 } // namespace net | 5197 } // namespace net |
| OLD | NEW |