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

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

Issue 1127623005: Gather metrics classifying the cause of the TLS fallback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fallback-required
Patch Set: missing header Created 5 years, 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_stream_factory_impl_request.h" 5 #include "net/http/http_stream_factory_impl_request.h"
6 6
7 #include "net/http/http_stream_factory_impl_job.h" 7 #include "net/http/http_stream_factory_impl_job.h"
8 #include "net/proxy/proxy_info.h" 8 #include "net/proxy/proxy_info.h"
9 #include "net/proxy/proxy_service.h" 9 #include "net/proxy/proxy_service.h"
10 #include "net/spdy/spdy_test_util_common.h" 10 #include "net/spdy/spdy_test_util_common.h"
11 #include "net/ssl/ssl_failure_state.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 13
13 namespace net { 14 namespace net {
14 15
15 class HttpStreamFactoryImplRequestTest 16 class HttpStreamFactoryImplRequestTest
16 : public ::testing::Test, 17 : public ::testing::Test,
17 public ::testing::WithParamInterface<NextProto> {}; 18 public ::testing::WithParamInterface<NextProto> {};
18 19
19 INSTANTIATE_TEST_CASE_P(NextProto, 20 INSTANTIATE_TEST_CASE_P(NextProto,
20 HttpStreamFactoryImplRequestTest, 21 HttpStreamFactoryImplRequestTest,
(...skipping 10 matching lines...) Expand all
31 ~DoNothingRequestDelegate() override {} 32 ~DoNothingRequestDelegate() override {}
32 33
33 // HttpStreamRequest::Delegate 34 // HttpStreamRequest::Delegate
34 void OnStreamReady(const SSLConfig& used_ssl_config, 35 void OnStreamReady(const SSLConfig& used_ssl_config,
35 const ProxyInfo& used_proxy_info, 36 const ProxyInfo& used_proxy_info,
36 HttpStream* stream) override {} 37 HttpStream* stream) override {}
37 void OnWebSocketHandshakeStreamReady( 38 void OnWebSocketHandshakeStreamReady(
38 const SSLConfig& used_ssl_config, 39 const SSLConfig& used_ssl_config,
39 const ProxyInfo& used_proxy_info, 40 const ProxyInfo& used_proxy_info,
40 WebSocketHandshakeStreamBase* stream) override {} 41 WebSocketHandshakeStreamBase* stream) override {}
41 void OnStreamFailed(int status, const SSLConfig& used_ssl_config) override {} 42 void OnStreamFailed(int status,
43 const SSLConfig& used_ssl_config,
44 SSLFailureState ssl_failure_state) override {}
42 void OnCertificateError(int status, 45 void OnCertificateError(int status,
43 const SSLConfig& used_ssl_config, 46 const SSLConfig& used_ssl_config,
44 const SSLInfo& ssl_info) override {} 47 const SSLInfo& ssl_info) override {}
45 void OnNeedsProxyAuth(const HttpResponseInfo& proxy_response, 48 void OnNeedsProxyAuth(const HttpResponseInfo& proxy_response,
46 const SSLConfig& used_ssl_config, 49 const SSLConfig& used_ssl_config,
47 const ProxyInfo& used_proxy_info, 50 const ProxyInfo& used_proxy_info,
48 HttpAuthController* auth_controller) override {} 51 HttpAuthController* auth_controller) override {}
49 void OnNeedsClientAuth(const SSLConfig& used_ssl_config, 52 void OnNeedsClientAuth(const SSLConfig& used_ssl_config,
50 SSLCertRequestInfo* cert_info) override {} 53 SSLCertRequestInfo* cert_info) override {}
51 void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info, 54 void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info,
(...skipping 26 matching lines...) Expand all
78 SSLConfig(), 81 SSLConfig(),
79 SSLConfig(), 82 SSLConfig(),
80 NULL); 83 NULL);
81 request.AttachJob(job); 84 request.AttachJob(job);
82 EXPECT_EQ(DEFAULT_PRIORITY, job->priority()); 85 EXPECT_EQ(DEFAULT_PRIORITY, job->priority());
83 86
84 request.SetPriority(MEDIUM); 87 request.SetPriority(MEDIUM);
85 EXPECT_EQ(MEDIUM, job->priority()); 88 EXPECT_EQ(MEDIUM, job->priority());
86 89
87 // Make |job| the bound job. 90 // Make |job| the bound job.
88 request.OnStreamFailed(job, ERR_FAILED, SSLConfig()); 91 request.OnStreamFailed(job, ERR_FAILED, SSLConfig(), SSL_FAILURE_NONE);
89 92
90 request.SetPriority(IDLE); 93 request.SetPriority(IDLE);
91 EXPECT_EQ(IDLE, job->priority()); 94 EXPECT_EQ(IDLE, job->priority());
92 } 95 }
93 96
94 } // namespace net 97 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_request.cc ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698