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 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1259 explicit LocalHttpTestServer(const FilePath& document_root) | 1259 explicit LocalHttpTestServer(const FilePath& document_root) |
1260 : TestServer(TestServer::TYPE_HTTP, | 1260 : TestServer(TestServer::TYPE_HTTP, |
1261 ScopedCustomUrlRequestTestHttpHost::value(), | 1261 ScopedCustomUrlRequestTestHttpHost::value(), |
1262 document_root) {} | 1262 document_root) {} |
1263 LocalHttpTestServer() | 1263 LocalHttpTestServer() |
1264 : TestServer(TestServer::TYPE_HTTP, | 1264 : TestServer(TestServer::TYPE_HTTP, |
1265 ScopedCustomUrlRequestTestHttpHost::value(), | 1265 ScopedCustomUrlRequestTestHttpHost::value(), |
1266 FilePath()) {} | 1266 FilePath()) {} |
1267 }; | 1267 }; |
1268 | 1268 |
1269 TEST_F(URLRequestTest, DelayedCookieCallback) { | 1269 TEST_F(URLRequestTest, FLAKY_DelayedCookieCallback) { |
1270 LocalHttpTestServer test_server; | 1270 LocalHttpTestServer test_server; |
1271 ASSERT_TRUE(test_server.Start()); | 1271 ASSERT_TRUE(test_server.Start()); |
1272 | 1272 |
1273 TestURLRequestContext context; | 1273 TestURLRequestContext context; |
1274 scoped_refptr<DelayedCookieMonster> delayed_cm = | 1274 scoped_refptr<DelayedCookieMonster> delayed_cm = |
1275 new DelayedCookieMonster(); | 1275 new DelayedCookieMonster(); |
1276 scoped_refptr<CookieStore> cookie_store = delayed_cm; | 1276 scoped_refptr<CookieStore> cookie_store = delayed_cm; |
1277 context.set_cookie_store(delayed_cm); | 1277 context.set_cookie_store(delayed_cm); |
1278 | 1278 |
1279 // Set up a cookie. | 1279 // Set up a cookie. |
(...skipping 3025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4305 public: | 4305 public: |
4306 URLRequestTestFTP() | 4306 URLRequestTestFTP() |
4307 : test_server_(TestServer::TYPE_FTP, TestServer::kLocalhost, FilePath()) { | 4307 : test_server_(TestServer::TYPE_FTP, TestServer::kLocalhost, FilePath()) { |
4308 } | 4308 } |
4309 | 4309 |
4310 protected: | 4310 protected: |
4311 TestServer test_server_; | 4311 TestServer test_server_; |
4312 }; | 4312 }; |
4313 | 4313 |
4314 // Make sure an FTP request using an unsafe ports fails. | 4314 // Make sure an FTP request using an unsafe ports fails. |
4315 TEST_F(URLRequestTestFTP, UnsafePort) { | 4315 TEST_F(URLRequestTestFTP, FLAKY_UnsafePort) { |
4316 ASSERT_TRUE(test_server_.Start()); | 4316 ASSERT_TRUE(test_server_.Start()); |
4317 | 4317 |
4318 URLRequestJobFactoryImpl job_factory; | 4318 URLRequestJobFactoryImpl job_factory; |
4319 | 4319 |
4320 GURL url("ftp://127.0.0.1:7"); | 4320 GURL url("ftp://127.0.0.1:7"); |
4321 FtpProtocolHandler ftp_protocol_handler( | 4321 FtpProtocolHandler ftp_protocol_handler( |
4322 default_context_.ftp_transaction_factory(), | 4322 default_context_.ftp_transaction_factory(), |
4323 default_context_.ftp_auth_cache()); | 4323 default_context_.ftp_auth_cache()); |
4324 job_factory.SetProtocolHandler( | 4324 job_factory.SetProtocolHandler( |
4325 "ftp", | 4325 "ftp", |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4651 | 4651 |
4652 EXPECT_FALSE(r.is_pending()); | 4652 EXPECT_FALSE(r.is_pending()); |
4653 EXPECT_EQ(1, d->response_started_count()); | 4653 EXPECT_EQ(1, d->response_started_count()); |
4654 EXPECT_FALSE(d->received_data_before_response()); | 4654 EXPECT_FALSE(d->received_data_before_response()); |
4655 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); | 4655 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); |
4656 } | 4656 } |
4657 } | 4657 } |
4658 #endif // !defined(DISABLE_FTP_SUPPORT) | 4658 #endif // !defined(DISABLE_FTP_SUPPORT) |
4659 | 4659 |
4660 } // namespace net | 4660 } // namespace net |
OLD | NEW |