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

Unified Diff: net/quic/quic_network_transaction_unittest.cc

Issue 1808303005: QUIC - extend origin-to-force-quic-on command line option to accept list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: net/quic/quic_network_transaction_unittest.cc
diff --git a/net/quic/quic_network_transaction_unittest.cc b/net/quic/quic_network_transaction_unittest.cc
index d4098c59f7175f3cf3ef76367e3b8b25fc5c0e56..d911d5d2871cb868e0d848b469b0cc83f11e02b5 100644
--- a/net/quic/quic_network_transaction_unittest.cc
+++ b/net/quic/quic_network_transaction_unittest.cc
@@ -621,8 +621,9 @@ INSTANTIATE_TEST_CASE_P(Version,
::testing::ValuesIn(QuicSupportedVersions()));
TEST_P(QuicNetworkTransactionTest, ForceQuic) {
- params_.origin_to_force_quic_on =
- HostPortPair::FromString("mail.example.org:443");
+ for (const char* host : {"mail.example.org:443"}) {
+ params_.origins_to_force_quic_on.insert(HostPortPair::FromString(host));
Ryan Hamilton 2016/03/20 22:46:53 Ditto, no need for loops here and below.
ramant (doing other things) 2016/03/21 17:23:48 Done.
+ }
MockQuicData mock_quic_data;
mock_quic_data.AddWrite(
@@ -809,8 +810,9 @@ TEST_P(QuicNetworkTransactionTest, AlternativeServicesDifferentHost) {
}
TEST_P(QuicNetworkTransactionTest, ForceQuicWithErrorConnecting) {
- params_.origin_to_force_quic_on =
- HostPortPair::FromString("mail.example.org:443");
+ for (const char* host : {"mail.example.org:443"}) {
+ params_.origins_to_force_quic_on.insert(HostPortPair::FromString(host));
+ }
MockQuicData mock_quic_data1;
mock_quic_data1.AddRead(ASYNC, ERR_SOCKET_NOT_CONNECTED);
@@ -841,8 +843,9 @@ TEST_P(QuicNetworkTransactionTest, ForceQuicWithErrorConnecting) {
TEST_P(QuicNetworkTransactionTest, DoNotForceQuicForHttps) {
// Attempt to "force" quic on 443, which will not be honored.
- params_.origin_to_force_quic_on =
- HostPortPair::FromString("www.google.com:443");
+ for (const char* host : {"www.google.com:443"}) {
+ params_.origins_to_force_quic_on.insert(HostPortPair::FromString(host));
+ }
MockRead http_reads[] = {
MockRead("HTTP/1.1 200 OK\r\n\r\n"), MockRead("hello world"),
@@ -2236,8 +2239,9 @@ TEST_P(QuicNetworkTransactionTest, SecureResourceOverSecureQuic) {
}
TEST_P(QuicNetworkTransactionTest, QuicUpload) {
- params_.origin_to_force_quic_on =
- HostPortPair::FromString("mail.example.org:443");
+ for (const char* host : {"mail.example.org:443"}) {
+ params_.origins_to_force_quic_on.insert(HostPortPair::FromString(host));
+ }
MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
MockWrite writes[] = {MockWrite(SYNCHRONOUS, ERR_FAILED, 1)};
« net/quic/quic_end_to_end_unittest.cc ('K') | « net/quic/quic_end_to_end_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698