OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <algorithm> | 5 #include <algorithm> |
6 #include <cstdint> | 6 #include <cstdint> |
7 #include <memory> | 7 #include <memory> |
8 #include <ostream> | 8 #include <ostream> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 const char* error_substr, | 195 const char* error_substr, |
196 bool* called) | 196 bool* called) |
197 : test_(test), | 197 : test_(test), |
198 should_succeed_(should_succeed), | 198 should_succeed_(should_succeed), |
199 error_substr_(error_substr), | 199 error_substr_(error_substr), |
200 called_(called) { | 200 called_(called) { |
201 *called_ = false; | 201 *called_ = false; |
202 } | 202 } |
203 | 203 |
204 void RunImpl(const CryptoHandshakeMessage& client_hello, | 204 void RunImpl(const CryptoHandshakeMessage& client_hello, |
205 const Result& result) override { | 205 const Result& result, |
| 206 std::unique_ptr<ProofSource::Details> /* details */) override { |
206 { | 207 { |
207 // Ensure that the strike register client lock is not held. | 208 // Ensure that the strike register client lock is not held. |
208 QuicCryptoServerConfigPeer peer(&test_->config_); | 209 QuicCryptoServerConfigPeer peer(&test_->config_); |
209 base::Lock* m = peer.GetStrikeRegisterClientLock(); | 210 base::Lock* m = peer.GetStrikeRegisterClientLock(); |
210 // In Chromium, we will dead lock if the lock is held by the current | 211 // In Chromium, we will dead lock if the lock is held by the current |
211 // thread. Chromium doesn't have AssertNotHeld API call. | 212 // thread. Chromium doesn't have AssertNotHeld API call. |
212 // m->AssertNotHeld(); | 213 // m->AssertNotHeld(); |
213 base::AutoLock lock(*m); | 214 base::AutoLock lock(*m); |
214 } | 215 } |
215 ASSERT_FALSE(*called_); | 216 ASSERT_FALSE(*called_); |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1208 EXPECT_EQ(0, strike_register_client_->PendingVerifications()); | 1209 EXPECT_EQ(0, strike_register_client_->PendingVerifications()); |
1209 } else { | 1210 } else { |
1210 // version 33. | 1211 // version 33. |
1211 ASSERT_EQ(kSHLO, out_.tag()); | 1212 ASSERT_EQ(kSHLO, out_.tag()); |
1212 CheckServerHello(out_); | 1213 CheckServerHello(out_); |
1213 } | 1214 } |
1214 } | 1215 } |
1215 | 1216 |
1216 } // namespace test | 1217 } // namespace test |
1217 } // namespace net | 1218 } // namespace net |
OLD | NEW |