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

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

Issue 2591143003: Add QuicStrCat. (Closed)
Patch Set: correct quic_client_bin.cc Created 3 years, 12 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/stateless_rejector.h" 5 #include "net/tools/quic/stateless_rejector.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 } 45 }
46 46
47 // Test various combinations of QUIC version and flag state. 47 // Test various combinations of QUIC version and flag state.
48 struct TestParams { 48 struct TestParams {
49 QuicVersion version; 49 QuicVersion version;
50 FlagsMode flags; 50 FlagsMode flags;
51 }; 51 };
52 52
53 string TestParamToString(const testing::TestParamInfo<TestParams>& params) { 53 string TestParamToString(const testing::TestParamInfo<TestParams>& params) {
54 return base::StringPrintf("v%i_%s", params.param.version, 54 return QuicStrCat("v", params.param.version, "_",
55 FlagsModeToString(params.param.flags)); 55 FlagsModeToString(params.param.flags));
56 } 56 }
57 57
58 std::vector<TestParams> GetTestParams() { 58 std::vector<TestParams> GetTestParams() {
59 std::vector<TestParams> params; 59 std::vector<TestParams> params;
60 for (FlagsMode flags : 60 for (FlagsMode flags :
61 {ENABLED, STATELESS_DISABLED, CHEAP_DISABLED, BOTH_DISABLED}) { 61 {ENABLED, STATELESS_DISABLED, CHEAP_DISABLED, BOTH_DISABLED}) {
62 for (QuicVersion version : AllSupportedVersions()) { 62 for (QuicVersion version : AllSupportedVersions()) {
63 TestParams param; 63 TestParams param;
64 param.version = version; 64 param.version = version;
65 param.flags = flags; 65 param.flags = flags;
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 ASSERT_EQ(StatelessRejector::UNKNOWN, rejector_->state()); 282 ASSERT_EQ(StatelessRejector::UNKNOWN, rejector_->state());
283 StatelessRejector::Process(std::move(rejector_), 283 StatelessRejector::Process(std::move(rejector_),
284 base::MakeUnique<ProcessDoneCallback>(this)); 284 base::MakeUnique<ProcessDoneCallback>(this));
285 285
286 EXPECT_EQ(StatelessRejector::ACCEPTED, rejector_->state()); 286 EXPECT_EQ(StatelessRejector::ACCEPTED, rejector_->state());
287 } 287 }
288 288
289 } // namespace 289 } // namespace
290 } // namespace test 290 } // namespace test
291 } // namespace net 291 } // namespace net
OLDNEW
« net/tools/quic/quic_simple_server_stream.cc ('K') | « net/tools/quic/quic_spdy_client_stream_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698