| OLD | NEW |
| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 struct TestParams { | 50 struct TestParams { |
| 51 QuicVersion version; | 51 QuicVersion version; |
| 52 FlagsMode flags; | 52 FlagsMode flags; |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 string TestParamToString(const testing::TestParamInfo<TestParams>& params) { | 55 string TestParamToString(const testing::TestParamInfo<TestParams>& params) { |
| 56 return base::StringPrintf("v%i_%s", params.param.version, | 56 return base::StringPrintf("v%i_%s", params.param.version, |
| 57 FlagsModeToString(params.param.flags)); | 57 FlagsModeToString(params.param.flags)); |
| 58 } | 58 } |
| 59 | 59 |
| 60 vector<TestParams> GetTestParams() { | 60 std::vector<TestParams> GetTestParams() { |
| 61 vector<TestParams> params; | 61 std::vector<TestParams> params; |
| 62 for (FlagsMode flags : | 62 for (FlagsMode flags : |
| 63 {ENABLED, STATELESS_DISABLED, CHEAP_DISABLED, BOTH_DISABLED}) { | 63 {ENABLED, STATELESS_DISABLED, CHEAP_DISABLED, BOTH_DISABLED}) { |
| 64 for (QuicVersion version : AllSupportedVersions()) { | 64 for (QuicVersion version : AllSupportedVersions()) { |
| 65 TestParams param; | 65 TestParams param; |
| 66 param.version = version; | 66 param.version = version; |
| 67 param.flags = flags; | 67 param.flags = flags; |
| 68 params.push_back(param); | 68 params.push_back(param); |
| 69 } | 69 } |
| 70 } | 70 } |
| 71 return params; | 71 return params; |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 ASSERT_EQ(StatelessRejector::UNKNOWN, rejector_->state()); | 284 ASSERT_EQ(StatelessRejector::UNKNOWN, rejector_->state()); |
| 285 StatelessRejector::Process(std::move(rejector_), | 285 StatelessRejector::Process(std::move(rejector_), |
| 286 base::MakeUnique<ProcessDoneCallback>(this)); | 286 base::MakeUnique<ProcessDoneCallback>(this)); |
| 287 | 287 |
| 288 EXPECT_EQ(StatelessRejector::ACCEPTED, rejector_->state()); | 288 EXPECT_EQ(StatelessRejector::ACCEPTED, rejector_->state()); |
| 289 } | 289 } |
| 290 | 290 |
| 291 } // namespace | 291 } // namespace |
| 292 } // namespace test | 292 } // namespace test |
| 293 } // namespace net | 293 } // namespace net |
| OLD | NEW |