OLD | NEW |
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 <stddef.h> | 5 #include <stddef.h> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 IPEndPoint server_address_; | 205 IPEndPoint server_address_; |
206 string server_hostname_; | 206 string server_hostname_; |
207 scoped_ptr<ServerThread> server_thread_; | 207 scoped_ptr<ServerThread> server_thread_; |
208 scoped_ptr<QuicTestClient> client_; | 208 scoped_ptr<QuicTestClient> client_; |
209 bool server_started_; | 209 bool server_started_; |
210 QuicConfig client_config_; | 210 QuicConfig client_config_; |
211 QuicConfig server_config_; | 211 QuicConfig server_config_; |
212 QuicVersion version_; | 212 QuicVersion version_; |
213 }; | 213 }; |
214 | 214 |
215 // Run all end to end tests with QUIC version 6 and 7. | 215 // Run all end to end tests with all supported versions. |
216 INSTANTIATE_TEST_CASE_P(EndToEndTests, | 216 INSTANTIATE_TEST_CASE_P(EndToEndTests, |
217 EndToEndTest, | 217 EndToEndTest, |
218 ::testing::Values(QUIC_VERSION_6, QUIC_VERSION_7)); | 218 ::testing::ValuesIn(kSupportedQuicVersions)); |
219 | 219 |
220 TEST_P(EndToEndTest, SimpleRequestResponse) { | 220 TEST_P(EndToEndTest, SimpleRequestResponse) { |
221 // TODO(rtenneti): Delete this when NSS is supported. | 221 // TODO(rtenneti): Delete this when NSS is supported. |
222 if (!Aes128Gcm12Encrypter::IsSupported()) { | 222 if (!Aes128Gcm12Encrypter::IsSupported()) { |
223 LOG(INFO) << "AES GCM not supported. Test skipped."; | 223 LOG(INFO) << "AES GCM not supported. Test skipped."; |
224 return; | 224 return; |
225 } | 225 } |
226 | 226 |
227 ASSERT_TRUE(Initialize()); | 227 ASSERT_TRUE(Initialize()); |
228 | 228 |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 QuicEpollConnectionHelperPeer::SetWriter(helper, NULL); | 642 QuicEpollConnectionHelperPeer::SetWriter(helper, NULL); |
643 | 643 |
644 EXPECT_EQ(QUIC_STREAM_CONNECTION_ERROR, client_->stream_error()); | 644 EXPECT_EQ(QUIC_STREAM_CONNECTION_ERROR, client_->stream_error()); |
645 EXPECT_EQ(QUIC_ERROR_MIGRATING_ADDRESS, client_->connection_error()); | 645 EXPECT_EQ(QUIC_ERROR_MIGRATING_ADDRESS, client_->connection_error()); |
646 } | 646 } |
647 | 647 |
648 } // namespace | 648 } // namespace |
649 } // namespace test | 649 } // namespace test |
650 } // namespace tools | 650 } // namespace tools |
651 } // namespace net | 651 } // namespace net |
OLD | NEW |