OLD | NEW |
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 Loading... |
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 mBuilder.setMockCertVerifierForTesting(QuicTestServer.createMockCertVeri
fier()); | 58 mBuilder.setMockCertVerifierForTesting(QuicTestServer.createMockCertVeri
fier()); |
58 mBuilder.setStoragePath(CronetTestFramework.getTestStorage(getContext())
); | 59 mBuilder.setStoragePath(CronetTestFramework.getTestStorage(getContext())
); |
59 mBuilder.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_DISK_NO_HTTP, 1
000 * 1024); | 60 mBuilder.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_DISK_NO_HTTP, 1
000 * 1024); |
60 } | 61 } |
61 | 62 |
62 @Override | 63 @Override |
63 protected void tearDown() throws Exception { | 64 protected void tearDown() throws Exception { |
64 QuicTestServer.shutdownQuicTestServer(); | 65 QuicTestServer.shutdownQuicTestServer(); |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // that executor has finished posting the RTT observation to the RTT lis
teners. | 219 // that executor has finished posting the RTT observation to the RTT lis
teners. |
219 // NETWORK_QUALITY_OBSERVATION_SOURCE_URL_REQUEST | 220 // NETWORK_QUALITY_OBSERVATION_SOURCE_URL_REQUEST |
220 assertTrue(rttListener.rttObservationCount(0) > 0); | 221 assertTrue(rttListener.rttObservationCount(0) > 0); |
221 | 222 |
222 // NETWORK_QUALITY_OBSERVATION_SOURCE_QUIC | 223 // NETWORK_QUALITY_OBSERVATION_SOURCE_QUIC |
223 assertTrue(rttListener.rttObservationCount(2) > 0); | 224 assertTrue(rttListener.rttObservationCount(2) > 0); |
224 | 225 |
225 mTestFramework.mCronetEngine.shutdown(); | 226 mTestFramework.mCronetEngine.shutdown(); |
226 } | 227 } |
227 } | 228 } |
OLD | NEW |