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

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

Issue 113931: Remove code path that passes a file handle to the renderer... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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/http/http_cache_unittest.cc ('k') | net/http/http_response_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <math.h> // ceil 5 #include <math.h> // ceil
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "net/base/client_socket_factory.h" 8 #include "net/base/client_socket_factory.h"
9 #include "net/base/completion_callback.h" 9 #include "net/base/completion_callback.h"
10 #include "net/base/socket_test_util.h" 10 #include "net/base/socket_test_util.h"
(...skipping 2580 matching lines...) Expand 10 before | Expand all | Expand 10 after
2591 EXPECT_EQ(-1, trans->header_buf_http_offset_); 2591 EXPECT_EQ(-1, trans->header_buf_http_offset_);
2592 EXPECT_EQ(-1, trans->response_body_length_); 2592 EXPECT_EQ(-1, trans->response_body_length_);
2593 EXPECT_EQ(0, trans->response_body_read_); 2593 EXPECT_EQ(0, trans->response_body_read_);
2594 EXPECT_EQ(NULL, trans->read_buf_.get()); 2594 EXPECT_EQ(NULL, trans->read_buf_.get());
2595 EXPECT_EQ(0, trans->read_buf_len_); 2595 EXPECT_EQ(0, trans->read_buf_len_);
2596 EXPECT_EQ("", trans->request_headers_->headers_); 2596 EXPECT_EQ("", trans->request_headers_->headers_);
2597 EXPECT_EQ(0U, trans->request_headers_bytes_sent_); 2597 EXPECT_EQ(0U, trans->request_headers_bytes_sent_);
2598 EXPECT_EQ(NULL, trans->response_.auth_challenge.get()); 2598 EXPECT_EQ(NULL, trans->response_.auth_challenge.get());
2599 EXPECT_EQ(NULL, trans->response_.headers.get()); 2599 EXPECT_EQ(NULL, trans->response_.headers.get());
2600 EXPECT_EQ(false, trans->response_.was_cached); 2600 EXPECT_EQ(false, trans->response_.was_cached);
2601 EXPECT_EQ(base::kInvalidPlatformFileValue,
2602 trans->response_.response_data_file);
2603 EXPECT_EQ(0, trans->response_.ssl_info.cert_status); 2601 EXPECT_EQ(0, trans->response_.ssl_info.cert_status);
2604 EXPECT_FALSE(trans->response_.vary_data.is_valid()); 2602 EXPECT_FALSE(trans->response_.vary_data.is_valid());
2605 } 2603 }
2606 2604
2607 // Test HTTPS connections to a site with a bad certificate 2605 // Test HTTPS connections to a site with a bad certificate
2608 TEST_F(HttpNetworkTransactionTest, HTTPSBadCertificate) { 2606 TEST_F(HttpNetworkTransactionTest, HTTPSBadCertificate) {
2609 scoped_ptr<ProxyService> proxy_service(CreateNullProxyService()); 2607 scoped_ptr<ProxyService> proxy_service(CreateNullProxyService());
2610 scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction( 2608 scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(
2611 CreateSession(proxy_service.get()), &mock_socket_factory_)); 2609 CreateSession(proxy_service.get()), &mock_socket_factory_));
2612 2610
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
3038 TestCompletionCallback callback; 3036 TestCompletionCallback callback;
3039 3037
3040 int rv = trans->Start(&request, &callback); 3038 int rv = trans->Start(&request, &callback);
3041 EXPECT_EQ(ERR_IO_PENDING, rv); 3039 EXPECT_EQ(ERR_IO_PENDING, rv);
3042 3040
3043 rv = callback.WaitForResult(); 3041 rv = callback.WaitForResult();
3044 EXPECT_EQ(OK, rv); 3042 EXPECT_EQ(OK, rv);
3045 } 3043 }
3046 3044
3047 } // namespace net 3045 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/http/http_response_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698