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

Unified Diff: chrome/browser/io_thread_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: chrome/browser/io_thread_unittest.cc
diff --git a/chrome/browser/io_thread_unittest.cc b/chrome/browser/io_thread_unittest.cc
index abf93c2ea2326e5b81e962633a9893714d766bd0..7eb97d9a4fbe351f77effaf687287b5d447586a8 100644
--- a/chrome/browser/io_thread_unittest.cc
+++ b/chrome/browser/io_thread_unittest.cc
@@ -603,6 +603,23 @@ TEST_F(IOThreadTest, QuicDelayTcpConnection) {
EXPECT_TRUE(params.quic_delay_tcp_race);
}
+TEST_F(IOThreadTest, QuicOriginsToForceQuicOn) {
+ command_line_.AppendSwitch(switches::kEnableQuic);
+ command_line_.AppendSwitchASCII(switches::kOriginToForceQuicOn,
Ryan Hamilton 2016/03/20 22:46:53 nit: Please a string literal here because it ensur
ramant (doing other things) 2016/03/21 17:23:47 Done.
+ "www.example.com:443, www.example.org:443");
+
+ ConfigureQuicGlobals();
+ net::HttpNetworkSession::Params params;
+ InitializeNetworkSessionParams(&params);
+ EXPECT_EQ(2u, params.origins_to_force_quic_on.size());
+ EXPECT_TRUE(
+ ContainsKey(params.origins_to_force_quic_on,
+ net::HostPortPair::FromString("www.example.com:443")));
+ EXPECT_TRUE(
+ ContainsKey(params.origins_to_force_quic_on,
+ net::HostPortPair::FromString("www.example.org:443")));
+}
+
TEST_F(IOThreadTest, QuicWhitelistFromCommandLinet) {
command_line_.AppendSwitch("enable-quic");
command_line_.AppendSwitchASCII("quic-host-whitelist",

Powered by Google App Engine
This is Rietveld 408576698