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

Side by Side Diff: net/http/http_network_transaction_spdy2_unittest.cc

Issue 9811006: Ignore Content-Length mismatches when Content-Length is too large. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove funny comment Created 8 years, 9 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
OLDNEW
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 "net/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 #include <stdarg.h> 8 #include <stdarg.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 6147 matching lines...) Expand 10 before | Expand all | Expand 10 after
6158 EXPECT_EQ(OK, callback.WaitForResult()); 6158 EXPECT_EQ(OK, callback.WaitForResult());
6159 6159
6160 const HttpResponseInfo* response = trans->GetResponseInfo(); 6160 const HttpResponseInfo* response = trans->GetResponseInfo();
6161 ASSERT_TRUE(response != NULL); 6161 ASSERT_TRUE(response != NULL);
6162 6162
6163 EXPECT_TRUE(response->headers != NULL); 6163 EXPECT_TRUE(response->headers != NULL);
6164 EXPECT_EQ("HTTP/1.0 200 OK", response->headers->GetStatusLine()); 6164 EXPECT_EQ("HTTP/1.0 200 OK", response->headers->GetStatusLine());
6165 6165
6166 std::string response_data; 6166 std::string response_data;
6167 rv = ReadTransaction(trans.get(), &response_data); 6167 rv = ReadTransaction(trans.get(), &response_data);
6168 EXPECT_EQ(ERR_CONNECTION_CLOSED, rv); 6168 EXPECT_EQ(OK, rv);
6169 } 6169 }
6170 6170
6171 TEST_F(HttpNetworkTransactionSpdy2Test, UploadFileSmallerThanLength) { 6171 TEST_F(HttpNetworkTransactionSpdy2Test, UploadFileSmallerThanLength) {
6172 HttpRequestInfo request; 6172 HttpRequestInfo request;
6173 request.method = "POST"; 6173 request.method = "POST";
6174 request.url = GURL("http://www.google.com/upload"); 6174 request.url = GURL("http://www.google.com/upload");
6175 request.upload_data = new UploadData; 6175 request.upload_data = new UploadData;
6176 request.load_flags = 0; 6176 request.load_flags = 0;
6177 6177
6178 SessionDependencies session_deps; 6178 SessionDependencies session_deps;
(...skipping 3372 matching lines...) Expand 10 before | Expand all | Expand 10 after
9551 HttpStreamFactory::SetNextProtos(std::vector<std::string>()); 9551 HttpStreamFactory::SetNextProtos(std::vector<std::string>());
9552 ClientSocketPoolManager::set_max_sockets_per_pool( 9552 ClientSocketPoolManager::set_max_sockets_per_pool(
9553 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_sockets_per_pool); 9553 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_sockets_per_pool);
9554 ClientSocketPoolManager::set_max_sockets_per_proxy_server( 9554 ClientSocketPoolManager::set_max_sockets_per_proxy_server(
9555 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_sockets_per_proxy_server); 9555 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_sockets_per_proxy_server);
9556 ClientSocketPoolManager::set_max_sockets_per_group( 9556 ClientSocketPoolManager::set_max_sockets_per_group(
9557 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_sockets_per_group); 9557 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_sockets_per_group);
9558 } 9558 }
9559 9559
9560 } // namespace net 9560 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698