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

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

Issue 2798403002: Removed "host_whitelist" QUIC parameter from Cronet Tests (Closed)
Patch Set: Cleaned Cronet tests by removing "host_whitelist" deprecated QUIC parameter. 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 static org.chromium.base.CollectionUtil.newHashSet; 7 import static org.chromium.base.CollectionUtil.newHashSet;
8 8
9 import android.support.test.filters.SmallTest; 9 import android.support.test.filters.SmallTest;
10 10
(...skipping 18 matching lines...) Expand all
29 29
30 private void setUp(QuicBidirectionalStreams enabled) throws Exception { 30 private void setUp(QuicBidirectionalStreams enabled) throws Exception {
31 // Load library first to create MockCertVerifier. 31 // Load library first to create MockCertVerifier.
32 System.loadLibrary("cronet_tests"); 32 System.loadLibrary("cronet_tests");
33 ExperimentalCronetEngine.Builder builder = 33 ExperimentalCronetEngine.Builder builder =
34 new ExperimentalCronetEngine.Builder(getContext()); 34 new ExperimentalCronetEngine.Builder(getContext());
35 35
36 QuicTestServer.startQuicTestServer(getContext()); 36 QuicTestServer.startQuicTestServer(getContext());
37 37
38 builder.enableQuic(true); 38 builder.enableQuic(true);
39 JSONObject quicParams = new JSONObject().put("host_whitelist", "test.exa mple.com"); 39 JSONObject quicParams = new JSONObject();
40 if (enabled == QuicBidirectionalStreams.DISABLED) { 40 if (enabled == QuicBidirectionalStreams.DISABLED) {
41 quicParams.put("quic_disable_bidirectional_streams", true); 41 quicParams.put("quic_disable_bidirectional_streams", true);
42 } 42 }
43 JSONObject hostResolverParams = CronetTestUtil.generateHostResolverRules (); 43 JSONObject hostResolverParams = CronetTestUtil.generateHostResolverRules ();
44 JSONObject experimentalOptions = new JSONObject() 44 JSONObject experimentalOptions = new JSONObject()
45 .put("QUIC", quicParams) 45 .put("QUIC", quicParams)
46 .put("HostResolverRules", hostR esolverParams); 46 .put("HostResolverRules", hostR esolverParams);
47 builder.setExperimentalOptions(experimentalOptions.toString()); 47 builder.setExperimentalOptions(experimentalOptions.toString());
48 48
49 builder.addQuicHint(QuicTestServer.getServerHost(), QuicTestServer.getSe rverPort(), 49 builder.addQuicHint(QuicTestServer.getServerHost(), QuicTestServer.getSe rverPort(),
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 CronetTestUtil.setMockCertVerifierForTesting( 367 CronetTestUtil.setMockCertVerifierForTesting(
368 builder, QuicTestServer.createMockCertVerifier()); 368 builder, QuicTestServer.createMockCertVerifier());
369 builder.setCertVerifierData(serialized_data); 369 builder.setCertVerifierData(serialized_data);
370 370
371 CronetTestFramework testFramework = 371 CronetTestFramework testFramework =
372 startCronetTestFrameworkWithUrlAndCronetEngineBuilder(null, buil der); 372 startCronetTestFrameworkWithUrlAndCronetEngineBuilder(null, buil der);
373 String deserialized_data = testFramework.mCronetEngine.getCertVerifierDa ta(100); 373 String deserialized_data = testFramework.mCronetEngine.getCertVerifierDa ta(100);
374 assertEquals(deserialized_data, serialized_data); 374 assertEquals(deserialized_data, serialized_data);
375 } 375 }
376 } 376 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698