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

Side by Side Diff: net/spdy/spdy_network_transaction_unittest.cc

Issue 1414313002: Allow dynamic updating of authentication policies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing Chromeos includes Created 5 years, 1 month 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 4926 matching lines...) Expand 10 before | Expand all | Expand 10 after
4937 4937
4938 // Make sure the response has an auth challenge. 4938 // Make sure the response has an auth challenge.
4939 const HttpResponseInfo* const response_start = trans->GetResponseInfo(); 4939 const HttpResponseInfo* const response_start = trans->GetResponseInfo();
4940 ASSERT_TRUE(response_start != NULL); 4940 ASSERT_TRUE(response_start != NULL);
4941 ASSERT_TRUE(response_start->headers.get() != NULL); 4941 ASSERT_TRUE(response_start->headers.get() != NULL);
4942 EXPECT_EQ(401, response_start->headers->response_code()); 4942 EXPECT_EQ(401, response_start->headers->response_code());
4943 EXPECT_TRUE(response_start->was_fetched_via_spdy); 4943 EXPECT_TRUE(response_start->was_fetched_via_spdy);
4944 AuthChallengeInfo* auth_challenge = response_start->auth_challenge.get(); 4944 AuthChallengeInfo* auth_challenge = response_start->auth_challenge.get();
4945 ASSERT_TRUE(auth_challenge != NULL); 4945 ASSERT_TRUE(auth_challenge != NULL);
4946 EXPECT_FALSE(auth_challenge->is_proxy); 4946 EXPECT_FALSE(auth_challenge->is_proxy);
4947 EXPECT_EQ("basic", auth_challenge->scheme); 4947 EXPECT_EQ(kBasicAuthScheme, auth_challenge->scheme);
4948 EXPECT_EQ("MyRealm", auth_challenge->realm); 4948 EXPECT_EQ("MyRealm", auth_challenge->realm);
4949 4949
4950 // Restart with a username/password. 4950 // Restart with a username/password.
4951 AuthCredentials credentials(base::ASCIIToUTF16("foo"), 4951 AuthCredentials credentials(base::ASCIIToUTF16("foo"),
4952 base::ASCIIToUTF16("bar")); 4952 base::ASCIIToUTF16("bar"));
4953 TestCompletionCallback callback_restart; 4953 TestCompletionCallback callback_restart;
4954 const int rv_restart = trans->RestartWithAuth( 4954 const int rv_restart = trans->RestartWithAuth(
4955 credentials, callback_restart.callback()); 4955 credentials, callback_restart.callback());
4956 EXPECT_EQ(ERR_IO_PENDING, rv_restart); 4956 EXPECT_EQ(ERR_IO_PENDING, rv_restart);
4957 const int rv_restart_complete = callback_restart.WaitForResult(); 4957 const int rv_restart_complete = callback_restart.WaitForResult();
(...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after
6590 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { 6590 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) {
6591 scoped_ptr<SSLSocketDataProvider> ssl_provider( 6591 scoped_ptr<SSLSocketDataProvider> ssl_provider(
6592 new SSLSocketDataProvider(ASYNC, OK)); 6592 new SSLSocketDataProvider(ASYNC, OK));
6593 // Set to TLS_RSA_WITH_NULL_MD5 6593 // Set to TLS_RSA_WITH_NULL_MD5
6594 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); 6594 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status);
6595 6595
6596 RunTLSUsageCheckTest(ssl_provider.Pass()); 6596 RunTLSUsageCheckTest(ssl_provider.Pass());
6597 } 6597 }
6598 6598
6599 } // namespace net 6599 } // namespace net
OLDNEW
« net/http/url_security_manager_win.cc ('K') | « net/http/url_security_manager_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698