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

Side by Side Diff: net/tools/quic/quic_dispatcher_test.cc

Issue 2464683002: adds std:: to stl types (#049) (Closed)
Patch Set: Created 4 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 "net/tools/quic/quic_dispatcher.h" 5 #include "net/tools/quic/quic_dispatcher.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <ostream> 8 #include <ostream>
9 #include <string> 9 #include <string>
10 10
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 // This only enables the stateless reject feature via the feature-flag. 580 // This only enables the stateless reject feature via the feature-flag.
581 // This should be a no-op if the peer does not support them. 581 // This should be a no-op if the peer does not support them.
582 bool enable_stateless_rejects_via_flag; 582 bool enable_stateless_rejects_via_flag;
583 // Whether or not the client supports stateless rejects. 583 // Whether or not the client supports stateless rejects.
584 bool client_supports_statelesss_rejects; 584 bool client_supports_statelesss_rejects;
585 // Should the initial crypto handshake succeed or not. 585 // Should the initial crypto handshake succeed or not.
586 bool crypto_handshake_successful; 586 bool crypto_handshake_successful;
587 }; 587 };
588 588
589 // Constructs various test permutations for stateless rejects. 589 // Constructs various test permutations for stateless rejects.
590 vector<StatelessRejectTestParams> GetStatelessRejectTestParams() { 590 std::vector<StatelessRejectTestParams> GetStatelessRejectTestParams() {
591 vector<StatelessRejectTestParams> params; 591 std::vector<StatelessRejectTestParams> params;
592 for (bool enable_stateless_rejects_via_flag : {true, false}) { 592 for (bool enable_stateless_rejects_via_flag : {true, false}) {
593 for (bool client_supports_statelesss_rejects : {true, false}) { 593 for (bool client_supports_statelesss_rejects : {true, false}) {
594 for (bool crypto_handshake_successful : {true, false}) { 594 for (bool crypto_handshake_successful : {true, false}) {
595 params.push_back(StatelessRejectTestParams( 595 params.push_back(StatelessRejectTestParams(
596 enable_stateless_rejects_via_flag, 596 enable_stateless_rejects_via_flag,
597 client_supports_statelesss_rejects, crypto_handshake_successful)); 597 client_supports_statelesss_rejects, crypto_handshake_successful));
598 } 598 }
599 } 599 }
600 } 600 }
601 return params; 601 return params;
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 return os; 1076 return os;
1077 } 1077 }
1078 1078
1079 // This only enables the stateless reject feature via the feature-flag. 1079 // This only enables the stateless reject feature via the feature-flag.
1080 // This should be a no-op if the peer does not support them. 1080 // This should be a no-op if the peer does not support them.
1081 bool enable_stateless_rejects_via_flag; 1081 bool enable_stateless_rejects_via_flag;
1082 // Whether to do cheap stateless or not. 1082 // Whether to do cheap stateless or not.
1083 bool support_cheap_stateless_reject; 1083 bool support_cheap_stateless_reject;
1084 }; 1084 };
1085 1085
1086 vector<BufferedPacketStoreTestParams> GetBufferedPacketStoreTestParams() { 1086 std::vector<BufferedPacketStoreTestParams> GetBufferedPacketStoreTestParams() {
1087 vector<BufferedPacketStoreTestParams> params; 1087 std::vector<BufferedPacketStoreTestParams> params;
1088 for (bool enable_stateless_rejects_via_flag : {true, false}) { 1088 for (bool enable_stateless_rejects_via_flag : {true, false}) {
1089 for (bool support_cheap_stateless_reject : {true, false}) { 1089 for (bool support_cheap_stateless_reject : {true, false}) {
1090 params.push_back(BufferedPacketStoreTestParams( 1090 params.push_back(BufferedPacketStoreTestParams(
1091 enable_stateless_rejects_via_flag, support_cheap_stateless_reject)); 1091 enable_stateless_rejects_via_flag, support_cheap_stateless_reject));
1092 } 1092 }
1093 } 1093 }
1094 return params; 1094 return params;
1095 } 1095 }
1096 1096
1097 // A dispatcher whose stateless rejector will always ACCEPTs CHLO. 1097 // A dispatcher whose stateless rejector will always ACCEPTs CHLO.
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
2024 check.Call(2); 2024 check.Call(2);
2025 GetFakeProofSource()->InvokePendingCallback(0); 2025 GetFakeProofSource()->InvokePendingCallback(0);
2026 ASSERT_EQ(GetFakeProofSource()->NumPendingCallbacks(), 0); 2026 ASSERT_EQ(GetFakeProofSource()->NumPendingCallbacks(), 0);
2027 EXPECT_FALSE(store->HasBufferedPackets(conn_id)); 2027 EXPECT_FALSE(store->HasBufferedPackets(conn_id));
2028 EXPECT_FALSE(time_wait_list_manager_->IsConnectionIdInTimeWait(conn_id)); 2028 EXPECT_FALSE(time_wait_list_manager_->IsConnectionIdInTimeWait(conn_id));
2029 } 2029 }
2030 2030
2031 } // namespace 2031 } // namespace
2032 } // namespace test 2032 } // namespace test
2033 } // namespace net 2033 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698