| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "net/url_request/url_request_unittest.h" | 5 #include "net/url_request/url_request_unittest.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 EXPECT_FALSE(ContainsString(data, "Content-Length:")); | 1333 EXPECT_FALSE(ContainsString(data, "Content-Length:")); |
| 1334 EXPECT_FALSE(ContainsString(data, "Content-Type:")); | 1334 EXPECT_FALSE(ContainsString(data, "Content-Type:")); |
| 1335 EXPECT_FALSE(ContainsString(data, "Origin:")); | 1335 EXPECT_FALSE(ContainsString(data, "Origin:")); |
| 1336 | 1336 |
| 1337 // These extra request headers should not have been stripped. | 1337 // These extra request headers should not have been stripped. |
| 1338 EXPECT_TRUE(ContainsString(data, "Accept:")); | 1338 EXPECT_TRUE(ContainsString(data, "Accept:")); |
| 1339 EXPECT_TRUE(ContainsString(data, "Accept-Language:")); | 1339 EXPECT_TRUE(ContainsString(data, "Accept-Language:")); |
| 1340 EXPECT_TRUE(ContainsString(data, "Accept-Charset:")); | 1340 EXPECT_TRUE(ContainsString(data, "Accept-Charset:")); |
| 1341 } | 1341 } |
| 1342 | 1342 |
| 1343 // TODO(darin): Re-enable this test once bug 16832 is fixed. | 1343 TEST_F(URLRequestTest, Post307RedirectPost) { |
| 1344 TEST_F(URLRequestTest, DISABLED_Post307RedirectPost) { | |
| 1345 const char kData[] = "hello world"; | 1344 const char kData[] = "hello world"; |
| 1346 scoped_refptr<HTTPTestServer> server = | 1345 scoped_refptr<HTTPTestServer> server = |
| 1347 HTTPTestServer::CreateServer(L"net/data/url_request_unittest", NULL); | 1346 HTTPTestServer::CreateServer(L"net/data/url_request_unittest", NULL); |
| 1348 ASSERT_TRUE(NULL != server.get()); | 1347 ASSERT_TRUE(NULL != server.get()); |
| 1349 TestDelegate d; | 1348 TestDelegate d; |
| 1350 TestURLRequest req(server->TestServerPage("files/redirect307-to-echo"), | 1349 TestURLRequest req(server->TestServerPage("files/redirect307-to-echo"), |
| 1351 &d); | 1350 &d); |
| 1352 req.set_method("POST"); | 1351 req.set_method("POST"); |
| 1353 req.set_upload(CreateSimpleUploadData(kData).get()); | 1352 req.set_upload(CreateSimpleUploadData(kData).get()); |
| 1354 req.SetExtraRequestHeaders( | 1353 req.SetExtraRequestHeaders( |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1911 | 1910 |
| 1912 int64 file_size = 0; | 1911 int64 file_size = 0; |
| 1913 file_util::GetFileSize(app_path, &file_size); | 1912 file_util::GetFileSize(app_path, &file_size); |
| 1914 | 1913 |
| 1915 EXPECT_TRUE(!r.is_pending()); | 1914 EXPECT_TRUE(!r.is_pending()); |
| 1916 EXPECT_EQ(1, d.response_started_count()); | 1915 EXPECT_EQ(1, d.response_started_count()); |
| 1917 EXPECT_FALSE(d.received_data_before_response()); | 1916 EXPECT_FALSE(d.received_data_before_response()); |
| 1918 EXPECT_EQ(d.bytes_received(), 0); | 1917 EXPECT_EQ(d.bytes_received(), 0); |
| 1919 } | 1918 } |
| 1920 } | 1919 } |
| OLD | NEW |