OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 cert_verifier, | 578 cert_verifier, |
579 NULL, | 579 NULL, |
580 NULL, | 580 NULL, |
581 NULL, | 581 NULL, |
582 std::string(), | 582 std::string(), |
583 NULL, | 583 NULL, |
584 NULL, | 584 NULL, |
585 NULL, | 585 NULL, |
586 NULL, | 586 NULL, |
587 NULL, | 587 NULL, |
588 NULL) {} | 588 false, |
| 589 NULL) { |
| 590 } |
589 | 591 |
590 //----------------------------------------------------------------------------- | 592 //----------------------------------------------------------------------------- |
591 | 593 |
592 // Helper functions for validating that AuthChallengeInfo's are correctly | 594 // Helper functions for validating that AuthChallengeInfo's are correctly |
593 // configured for common cases. | 595 // configured for common cases. |
594 bool CheckBasicServerAuth(const AuthChallengeInfo* auth_challenge) { | 596 bool CheckBasicServerAuth(const AuthChallengeInfo* auth_challenge) { |
595 if (!auth_challenge) | 597 if (!auth_challenge) |
596 return false; | 598 return false; |
597 EXPECT_FALSE(auth_challenge->is_proxy); | 599 EXPECT_FALSE(auth_challenge->is_proxy); |
598 EXPECT_EQ("www.google.com:80", auth_challenge->challenger.ToString()); | 600 EXPECT_EQ("www.google.com:80", auth_challenge->challenger.ToString()); |
(...skipping 12604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13203 EXPECT_EQ(ERR_IO_PENDING, rv); | 13205 EXPECT_EQ(ERR_IO_PENDING, rv); |
13204 | 13206 |
13205 rv = callback.WaitForResult(); | 13207 rv = callback.WaitForResult(); |
13206 EXPECT_EQ(ERR_CONNECTION_RESET, rv); | 13208 EXPECT_EQ(ERR_CONNECTION_RESET, rv); |
13207 | 13209 |
13208 const HttpResponseInfo* response = trans->GetResponseInfo(); | 13210 const HttpResponseInfo* response = trans->GetResponseInfo(); |
13209 EXPECT_TRUE(response == NULL); | 13211 EXPECT_TRUE(response == NULL); |
13210 } | 13212 } |
13211 | 13213 |
13212 } // namespace net | 13214 } // namespace net |
OLD | NEW |