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

Side by Side Diff: net/url_request/url_request_unittest.cc

Issue 165365: Merge 22100 - Fix 307 redirects of a POST request to actually send the body a... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/url_request/url_request.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/net/url_request/url_request_unittest.cc:r22100
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « net/url_request/url_request.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698