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

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

Issue 1973403002: QUIC - Add back to code to experiment with delay_tcp_race. By default, (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « chrome/browser/io_thread_unittest.cc ('k') | components/cronet/url_request_context_config.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.test.suitebuilder.annotation.LargeTest; 7 import android.test.suitebuilder.annotation.LargeTest;
8 import android.test.suitebuilder.annotation.SmallTest; 8 import android.test.suitebuilder.annotation.SmallTest;
9 9
10 import org.chromium.base.Log; 10 import org.chromium.base.Log;
(...skipping 25 matching lines...) Expand all
36 36
37 mBuilder = new CronetEngine.Builder(getContext()); 37 mBuilder = new CronetEngine.Builder(getContext());
38 mBuilder.enableQUIC(true); 38 mBuilder.enableQUIC(true);
39 mBuilder.addQuicHint(QuicTestServer.getServerHost(), QuicTestServer.getS erverPort(), 39 mBuilder.addQuicHint(QuicTestServer.getServerHost(), QuicTestServer.getS erverPort(),
40 QuicTestServer.getServerPort()); 40 QuicTestServer.getServerPort());
41 41
42 JSONObject quicParams = new JSONObject() 42 JSONObject quicParams = new JSONObject()
43 .put("connection_options", "PACE,IW10,FO O,DEADBEEF") 43 .put("connection_options", "PACE,IW10,FO O,DEADBEEF")
44 .put("host_whitelist", "test.example.com ") 44 .put("host_whitelist", "test.example.com ")
45 .put("max_server_configs_stored_in_prope rties", 2) 45 .put("max_server_configs_stored_in_prope rties", 2)
46 .put("delay_tcp_race", true)
46 .put("max_number_of_lossy_connections", 10) 47 .put("max_number_of_lossy_connections", 10)
47 .put("packet_loss_threshold", 0.5) 48 .put("packet_loss_threshold", 0.5)
48 .put("idle_connection_timeout_seconds", 300) 49 .put("idle_connection_timeout_seconds", 300)
49 .put("close_sessions_on_ip_change", fals e) 50 .put("close_sessions_on_ip_change", fals e)
50 .put("migrate_sessions_on_network_change ", true) 51 .put("migrate_sessions_on_network_change ", true)
51 .put("migrate_sessions_early", true); 52 .put("migrate_sessions_early", true);
52 JSONObject experimentalOptions = new JSONObject().put("QUIC", quicParams ); 53 JSONObject experimentalOptions = new JSONObject().put("QUIC", quicParams );
53 mBuilder.setExperimentalOptions(experimentalOptions.toString()); 54 mBuilder.setExperimentalOptions(experimentalOptions.toString());
54 55
55 mBuilder.setMockCertVerifierForTesting(QuicTestServer.createMockCertVeri fier()); 56 mBuilder.setMockCertVerifierForTesting(QuicTestServer.createMockCertVeri fier());
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 private boolean fileContainsString(String filename, String content) throws I OException { 164 private boolean fileContainsString(String filename, String content) throws I OException {
164 File file = 165 File file =
165 new File(CronetTestFramework.getTestStorage(getContext()) + "/pr efs/" + filename); 166 new File(CronetTestFramework.getTestStorage(getContext()) + "/pr efs/" + filename);
166 FileInputStream fileInputStream = new FileInputStream(file); 167 FileInputStream fileInputStream = new FileInputStream(file);
167 byte[] data = new byte[(int) file.length()]; 168 byte[] data = new byte[(int) file.length()];
168 fileInputStream.read(data); 169 fileInputStream.read(data);
169 fileInputStream.close(); 170 fileInputStream.close();
170 return new String(data, "UTF-8").contains(content); 171 return new String(data, "UTF-8").contains(content);
171 } 172 }
172 } 173 }
OLDNEW
« no previous file with comments | « chrome/browser/io_thread_unittest.cc ('k') | components/cronet/url_request_context_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698