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

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

Issue 16901013: Expose receive header end time for URLRequestRedirectJob (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Patch for landing Created 7 years, 5 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
« no previous file with comments | « net/url_request/url_request_redirect_job.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')
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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 #endif 10 #endif
(...skipping 4886 matching lines...) Expand 10 before | Expand all | Expand 10 after
4897 &context); 4897 &context);
4898 req.set_method("POST"); 4898 req.set_method("POST");
4899 req.set_upload(make_scoped_ptr(CreateSimpleUploadData(kData))); 4899 req.set_upload(make_scoped_ptr(CreateSimpleUploadData(kData)));
4900 4900
4901 req.Start(); 4901 req.Start();
4902 base::MessageLoop::current()->Run(); 4902 base::MessageLoop::current()->Run();
4903 4903
4904 EXPECT_EQ("https", req.url().scheme()); 4904 EXPECT_EQ("https", req.url().scheme());
4905 EXPECT_EQ("POST", req.method()); 4905 EXPECT_EQ("POST", req.method());
4906 EXPECT_EQ(kData, d.data_received()); 4906 EXPECT_EQ(kData, d.data_received());
4907
4908 LoadTimingInfo load_timing_info;
4909 network_delegate.GetLoadTimingInfoBeforeRedirect(&load_timing_info);
4910 // LoadTimingInfo of HSTS redirects is similar to that of network cache hits
4911 TestLoadTimingCacheHitNoNetwork(load_timing_info);
4907 } 4912 }
4908 4913
4909 TEST_F(HTTPSRequestTest, SSLv3Fallback) { 4914 TEST_F(HTTPSRequestTest, SSLv3Fallback) {
4910 SpawnedTestServer::SSLOptions ssl_options( 4915 SpawnedTestServer::SSLOptions ssl_options(
4911 SpawnedTestServer::SSLOptions::CERT_OK); 4916 SpawnedTestServer::SSLOptions::CERT_OK);
4912 ssl_options.tls_intolerant = 4917 ssl_options.tls_intolerant =
4913 SpawnedTestServer::SSLOptions::TLS_INTOLERANT_ALL; 4918 SpawnedTestServer::SSLOptions::TLS_INTOLERANT_ALL;
4914 SpawnedTestServer test_server( 4919 SpawnedTestServer test_server(
4915 SpawnedTestServer::TYPE_HTTPS, 4920 SpawnedTestServer::TYPE_HTTPS,
4916 ssl_options, 4921 ssl_options,
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
5852 5857
5853 EXPECT_FALSE(r.is_pending()); 5858 EXPECT_FALSE(r.is_pending());
5854 EXPECT_EQ(1, d->response_started_count()); 5859 EXPECT_EQ(1, d->response_started_count());
5855 EXPECT_FALSE(d->received_data_before_response()); 5860 EXPECT_FALSE(d->received_data_before_response());
5856 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); 5861 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size));
5857 } 5862 }
5858 } 5863 }
5859 #endif // !defined(DISABLE_FTP_SUPPORT) 5864 #endif // !defined(DISABLE_FTP_SUPPORT)
5860 5865
5861 } // namespace net 5866 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_redirect_job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698