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

Side by Side Diff: components/cronet/android/test/javatests/src/org/chromium/net/QuicTest.java

Issue 2097123002: QUIC - Race Cert Verification with host resolution if certs are (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Race cert verification. Created 4 years, 5 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 package org.chromium.net; 5 package org.chromium.net;
6 6
7 import android.os.ConditionVariable; 7 import android.os.ConditionVariable;
8 import android.test.suitebuilder.annotation.LargeTest; 8 import android.test.suitebuilder.annotation.LargeTest;
9 import android.test.suitebuilder.annotation.SmallTest; 9 import android.test.suitebuilder.annotation.SmallTest;
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 JSONObject quicParams = new JSONObject() 44 JSONObject quicParams = new JSONObject()
45 .put("connection_options", "PACE,IW10,FO O,DEADBEEF") 45 .put("connection_options", "PACE,IW10,FO O,DEADBEEF")
46 .put("host_whitelist", "test.example.com ") 46 .put("host_whitelist", "test.example.com ")
47 .put("max_server_configs_stored_in_prope rties", 2) 47 .put("max_server_configs_stored_in_prope rties", 2)
48 .put("delay_tcp_race", true) 48 .put("delay_tcp_race", true)
49 .put("max_number_of_lossy_connections", 10) 49 .put("max_number_of_lossy_connections", 10)
50 .put("packet_loss_threshold", 0.5) 50 .put("packet_loss_threshold", 0.5)
51 .put("idle_connection_timeout_seconds", 300) 51 .put("idle_connection_timeout_seconds", 300)
52 .put("close_sessions_on_ip_change", fals e) 52 .put("close_sessions_on_ip_change", fals e)
53 .put("migrate_sessions_on_network_change ", true) 53 .put("migrate_sessions_on_network_change ", true)
54 .put("migrate_sessions_early", true); 54 .put("migrate_sessions_early", true)
55 .put("race_cert_verification", true);
55 JSONObject experimentalOptions = new JSONObject().put("QUIC", quicParams ); 56 JSONObject experimentalOptions = new JSONObject().put("QUIC", quicParams );
56 mBuilder.setExperimentalOptions(experimentalOptions.toString()); 57 mBuilder.setExperimentalOptions(experimentalOptions.toString());
57 58
58 mBuilder.setMockCertVerifierForTesting(QuicTestServer.createMockCertVeri fier()); 59 mBuilder.setMockCertVerifierForTesting(QuicTestServer.createMockCertVeri fier());
59 mBuilder.setStoragePath(CronetTestFramework.getTestStorage(getContext()) ); 60 mBuilder.setStoragePath(CronetTestFramework.getTestStorage(getContext()) );
60 mBuilder.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_DISK_NO_HTTP, 1 000 * 1024); 61 mBuilder.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_DISK_NO_HTTP, 1 000 * 1024);
61 } 62 }
62 63
63 @Override 64 @Override
64 protected void tearDown() throws Exception { 65 protected void tearDown() throws Exception {
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // that executor has finished posting the RTT observation to the RTT lis teners. 220 // that executor has finished posting the RTT observation to the RTT lis teners.
220 // NETWORK_QUALITY_OBSERVATION_SOURCE_URL_REQUEST 221 // NETWORK_QUALITY_OBSERVATION_SOURCE_URL_REQUEST
221 assertTrue(rttListener.rttObservationCount(0) > 0); 222 assertTrue(rttListener.rttObservationCount(0) > 0);
222 223
223 // NETWORK_QUALITY_OBSERVATION_SOURCE_QUIC 224 // NETWORK_QUALITY_OBSERVATION_SOURCE_QUIC
224 assertTrue(rttListener.rttObservationCount(2) > 0); 225 assertTrue(rttListener.rttObservationCount(2) > 0);
225 226
226 mTestFramework.mCronetEngine.shutdown(); 227 mTestFramework.mCronetEngine.shutdown();
227 } 228 }
228 } 229 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/quic_view.html ('k') | components/cronet/url_request_context_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698