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

Side by Side Diff: components/cronet/url_request_context_config_unittest.cc

Issue 2805053005: [Cronet] Enable Brotli (Closed)
Patch Set: fix cronet_unittests Created 3 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/cronet/url_request_context_config.h" 5 #include "components/cronet/url_request_context_config.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "net/cert/cert_verifier.h" 10 #include "net/cert/cert_verifier.h"
(...skipping 11 matching lines...) Expand all
22 TEST(URLRequestContextConfigTest, TestExperimentalOptionParsing) { 22 TEST(URLRequestContextConfigTest, TestExperimentalOptionParsing) {
23 URLRequestContextConfig config( 23 URLRequestContextConfig config(
24 // Enable QUIC. 24 // Enable QUIC.
25 true, 25 true,
26 // QUIC User Agent ID. 26 // QUIC User Agent ID.
27 "Default QUIC User Agent ID", 27 "Default QUIC User Agent ID",
28 // Enable SPDY. 28 // Enable SPDY.
29 true, 29 true,
30 // Enable SDCH. 30 // Enable SDCH.
31 false, 31 false,
32 // Enable Brotli.
33 false,
32 // Type of http cache. 34 // Type of http cache.
33 URLRequestContextConfig::HttpCacheType::DISK, 35 URLRequestContextConfig::HttpCacheType::DISK,
34 // Max size of http cache in bytes. 36 // Max size of http cache in bytes.
35 1024000, 37 1024000,
36 // Disable caching for HTTP responses. Other information may be stored in 38 // Disable caching for HTTP responses. Other information may be stored in
37 // the cache. 39 // the cache.
38 false, 40 false,
39 // Storage path for http cache and cookie storage. 41 // Storage path for http cache and cookie storage.
40 "/data/data/org.chromium.net/app_cronet_test/test_storage", 42 "/data/data/org.chromium.net/app_cronet_test/test_storage",
41 // User-Agent request header field. 43 // User-Agent request header field.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 TEST(URLRequestContextConfigTest, SetQuicConnectionMigrationOptions) { 130 TEST(URLRequestContextConfigTest, SetQuicConnectionMigrationOptions) {
129 URLRequestContextConfig config( 131 URLRequestContextConfig config(
130 // Enable QUIC. 132 // Enable QUIC.
131 true, 133 true,
132 // QUIC User Agent ID. 134 // QUIC User Agent ID.
133 "Default QUIC User Agent ID", 135 "Default QUIC User Agent ID",
134 // Enable SPDY. 136 // Enable SPDY.
135 true, 137 true,
136 // Enable SDCH. 138 // Enable SDCH.
137 false, 139 false,
140 // Enable Brotli.
141 false,
138 // Type of http cache. 142 // Type of http cache.
139 URLRequestContextConfig::HttpCacheType::DISK, 143 URLRequestContextConfig::HttpCacheType::DISK,
140 // Max size of http cache in bytes. 144 // Max size of http cache in bytes.
141 1024000, 145 1024000,
142 // Disable caching for HTTP responses. Other information may be stored in 146 // Disable caching for HTTP responses. Other information may be stored in
143 // the cache. 147 // the cache.
144 false, 148 false,
145 // Storage path for http cache and cookie storage. 149 // Storage path for http cache and cookie storage.
146 "/data/data/org.chromium.net/app_cronet_test/test_storage", 150 "/data/data/org.chromium.net/app_cronet_test/test_storage",
147 // User-Agent request header field. 151 // User-Agent request header field.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 context->GetNetworkSessionParams(); 183 context->GetNetworkSessionParams();
180 184
181 EXPECT_FALSE(params->quic_close_sessions_on_ip_change); 185 EXPECT_FALSE(params->quic_close_sessions_on_ip_change);
182 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change); 186 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change);
183 EXPECT_TRUE(params->quic_migrate_sessions_early); 187 EXPECT_TRUE(params->quic_migrate_sessions_early);
184 } 188 }
185 189
186 // See stale_host_resolver_unittest.cc for test of StaleDNS options. 190 // See stale_host_resolver_unittest.cc for test of StaleDNS options.
187 191
188 } // namespace cronet 192 } // namespace cronet
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698