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

Side by Side Diff: net/quic/quic_end_to_end_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: Fixed comments for Patch Set 1 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 unified diff | Download patch
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/quic/quic_network_transaction_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 <ostream> 5 #include <ostream>
6 #include <utility> 6 #include <utility>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 StartServer(); 152 StartServer();
153 153
154 // Use a mapped host resolver so that request for test.example.com (port 80) 154 // Use a mapped host resolver so that request for test.example.com (port 80)
155 // reach the server running on localhost. 155 // reach the server running on localhost.
156 std::string map_rule = "MAP test.example.com test.example.com:" + 156 std::string map_rule = "MAP test.example.com test.example.com:" +
157 base::IntToString(server_thread_->GetPort()); 157 base::IntToString(server_thread_->GetPort());
158 EXPECT_TRUE(host_resolver_.AddRuleFromString(map_rule)); 158 EXPECT_TRUE(host_resolver_.AddRuleFromString(map_rule));
159 159
160 // To simplify the test, and avoid the race with the HTTP request, we force 160 // To simplify the test, and avoid the race with the HTTP request, we force
161 // QUIC for these requests. 161 // QUIC for these requests.
162 params_.origin_to_force_quic_on = 162 params_.origins_to_force_quic_on.insert(
163 HostPortPair::FromString("test.example.com:443"); 163 HostPortPair::FromString("test.example.com:443"));
164 164
165 transaction_factory_.reset(new TestTransactionFactory(params_)); 165 transaction_factory_.reset(new TestTransactionFactory(params_));
166 } 166 }
167 167
168 void TearDown() override { 168 void TearDown() override {
169 StopServer(); 169 StopServer();
170 QuicInMemoryCachePeer::ResetForTests(); 170 QuicInMemoryCachePeer::ResetForTests();
171 } 171 }
172 172
173 // Starts the QUIC server listening on a random port. 173 // Starts the QUIC server listening on a random port.
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 base::MessageLoop::current()->Run(); 373 base::MessageLoop::current()->Run();
374 374
375 for (size_t i = 0; i < num_requests; ++i) { 375 for (size_t i = 0; i < num_requests; ++i) {
376 CheckResponse(*consumers[i], "HTTP/1.1 200", kResponseBody); 376 CheckResponse(*consumers[i], "HTTP/1.1 200", kResponseBody);
377 } 377 }
378 STLDeleteElements(&consumers); 378 STLDeleteElements(&consumers);
379 } 379 }
380 380
381 } // namespace test 381 } // namespace test
382 } // namespace net 382 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/quic/quic_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698