diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-23 03:02:10 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-23 03:02:10 +0000 |
commit | ea4a1d01a2d1aad09c92821a51bb44c4412785f8 (patch) | |
tree | d1ab077a0dd553fb5c8f81c489dd8f90693ed72f /net/http/http_network_transaction_unittest.cc | |
parent | 1961e77be011903324a97da5354d267b0fae1904 (diff) | |
download | chromium_src-ea4a1d01a2d1aad09c92821a51bb44c4412785f8.zip chromium_src-ea4a1d01a2d1aad09c92821a51bb44c4412785f8.tar.gz chromium_src-ea4a1d01a2d1aad09c92821a51bb44c4412785f8.tar.bz2 |
Revert r42300: "HttpRequestHeaders refactor."
Broke access-control-basic-whitelist-request-headers.html layout test.
BUG=22588
Review URL: http://codereview.chromium.org/1110012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42305 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_transaction_unittest.cc')
-rw-r--r-- | net/http/http_network_transaction_unittest.cc | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc index d942d334..b25dcfb 100644 --- a/net/http/http_network_transaction_unittest.cc +++ b/net/http/http_network_transaction_unittest.cc @@ -3379,45 +3379,6 @@ TEST_F(HttpNetworkTransactionTest, BuildRequest_ExtraHeaders) { EXPECT_EQ(OK, rv); } -TEST_F(HttpNetworkTransactionTest, BuildRequest_ExtraHeadersStripped) { - SessionDependencies session_deps; - scoped_ptr<HttpTransaction> trans( - new HttpNetworkTransaction(CreateSession(&session_deps))); - - HttpRequestInfo request; - request.method = "GET"; - request.url = GURL("http://www.google.com/"); - request.extra_headers = "referer: www.foo.com\nhEllo: Kitty\rFoO: bar\r\n"; - - MockWrite data_writes[] = { - MockWrite("GET / HTTP/1.1\r\n" - "Host: www.google.com\r\n" - "Connection: keep-alive\r\n" - "hEllo: Kitty\r\n" - "FoO: bar\r\n\r\n"), - }; - - // Lastly, the server responds with the actual content. - MockRead data_reads[] = { - MockRead("HTTP/1.0 200 OK\r\n"), - MockRead("Content-Type: text/html; charset=iso-8859-1\r\n"), - MockRead("Content-Length: 100\r\n\r\n"), - MockRead(false, OK), - }; - - StaticSocketDataProvider data(data_reads, arraysize(data_reads), - data_writes, arraysize(data_writes)); - session_deps.socket_factory.AddSocketDataProvider(&data); - - TestCompletionCallback callback; - - int rv = trans->Start(&request, &callback, NULL); - EXPECT_EQ(ERR_IO_PENDING, rv); - - rv = callback.WaitForResult(); - EXPECT_EQ(OK, rv); -} - TEST_F(HttpNetworkTransactionTest, SOCKS4_HTTP_GET) { SessionDependencies session_deps( CreateFixedProxyService("socks4://myproxy:1080")); |