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

Unified Diff: chrome/browser/io_thread_unittest.cc

Issue 1354283002: Use QUIC for DRP if field trial group starts with Enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 3 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
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/io_thread_unittest.cc
diff --git a/chrome/browser/io_thread_unittest.cc b/chrome/browser/io_thread_unittest.cc
index ea83be907248f50e301cbdeee209f60fbcaf040d..f2ce96c50d76521b859199f67e8fedc2a5fa1b41 100644
--- a/chrome/browser/io_thread_unittest.cc
+++ b/chrome/browser/io_thread_unittest.cc
@@ -177,17 +177,45 @@ TEST_F(IOThreadTest, EnableQuicFromFieldTrialGroup) {
}
TEST_F(IOThreadTest, EnableQuicFromQuicProxyFieldTrialGroup) {
- base::FieldTrialList field_trial_list(new base::MockEntropyProvider());
- base::FieldTrialList::CreateFieldTrial(
- data_reduction_proxy::params::GetQuicFieldTrialName(), "Enabled");
-
- ConfigureQuicGlobals();
- net::HttpNetworkSession::Params params;
- InitializeNetworkSessionParams(&params);
- EXPECT_FALSE(params.enable_quic);
- EXPECT_TRUE(params.enable_quic_for_proxies);
- EXPECT_TRUE(IOThread::ShouldEnableQuicForDataReductionProxy());
- EXPECT_EQ(1024 * 1024, params.quic_socket_receive_buffer_size);
+ const struct {
+ std::string field_trial_group_name;
+ bool expect_enable_quic;
+ } tests[] = {
+ {
+ std::string(), false,
+ },
+ {
+ "NotEnabled", false,
+ },
+ {
+ "Control", false,
+ },
+ {
+ "Disabled", false,
+ },
+ {
+ "EnabledControl", true,
+ },
+ {
+ "Enabled", true,
+ },
+ };
+
+ for (size_t i = 0; i < arraysize(tests); ++i) {
+ base::FieldTrialList field_trial_list(new base::MockEntropyProvider());
+ base::FieldTrialList::CreateFieldTrial(
+ data_reduction_proxy::params::GetQuicFieldTrialName(),
+ tests[i].field_trial_group_name);
+
+ ConfigureQuicGlobals();
+ net::HttpNetworkSession::Params params;
+ InitializeNetworkSessionParams(&params);
+ EXPECT_FALSE(params.enable_quic) << i;
+ EXPECT_EQ(tests[i].expect_enable_quic, params.enable_quic_for_proxies) << i;
+ EXPECT_EQ(tests[i].expect_enable_quic,
+ IOThread::ShouldEnableQuicForDataReductionProxy())
+ << i;
+ }
}
TEST_F(IOThreadTest, EnableQuicFromCommandLine) {
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698