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

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

Issue 1665503002: [Cronet] Expose quic_user_agent_id and quic_prefer_aes config options. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync Created 4 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.content.Context; 9 import android.content.Context;
10 import android.content.ContextWrapper; 10 import android.content.ContextWrapper;
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 @Feature({"Cronet"}) 939 @Feature({"Cronet"})
940 public void testCronetEngineBuilderConfig() throws Exception { 940 public void testCronetEngineBuilderConfig() throws Exception {
941 // This is to prompt load of native library. 941 // This is to prompt load of native library.
942 startCronetTestFramework(); 942 startCronetTestFramework();
943 // Verify CronetEngine.Builder config is passed down accurately to nativ e code. 943 // Verify CronetEngine.Builder config is passed down accurately to nativ e code.
944 CronetEngine.Builder builder = new CronetEngine.Builder(getContext()); 944 CronetEngine.Builder builder = new CronetEngine.Builder(getContext());
945 builder.enableHTTP2(false); 945 builder.enableHTTP2(false);
946 builder.enableQUIC(true); 946 builder.enableQUIC(true);
947 builder.enableSDCH(true); 947 builder.enableSDCH(true);
948 builder.addQuicHint("example.com", 12, 34); 948 builder.addQuicHint("example.com", 12, 34);
949 builder.setQuicUserAgentId("quaid");
949 builder.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_IN_MEMORY, 54321 ); 950 builder.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_IN_MEMORY, 54321 );
950 builder.enableDataReductionProxy("abcd"); 951 builder.enableDataReductionProxy("abcd");
951 builder.setUserAgent("efgh"); 952 builder.setUserAgent("efgh");
952 builder.setExperimentalOptions("ijkl"); 953 builder.setExperimentalOptions("ijkl");
953 builder.setDataReductionProxyOptions("mnop", "qrst", "uvwx"); 954 builder.setDataReductionProxyOptions("mnop", "qrst", "uvwx");
954 builder.setStoragePath(CronetTestFramework.getTestStorage(getContext())) ; 955 builder.setStoragePath(CronetTestFramework.getTestStorage(getContext())) ;
955 nativeVerifyUrlRequestContextConfig( 956 nativeVerifyUrlRequestContextConfig(
956 CronetUrlRequestContext.createNativeUrlRequestContextConfig(buil der), 957 CronetUrlRequestContext.createNativeUrlRequestContextConfig(buil der),
957 CronetTestFramework.getTestStorage(getContext())); 958 CronetTestFramework.getTestStorage(getContext()));
958 } 959 }
(...skipping 24 matching lines...) Expand all
983 try { 984 try {
984 // ensureInitialized() calls native code to check the version right after library load 985 // ensureInitialized() calls native code to check the version right after library load
985 // and will error with the message below if library loading was skip ped 986 // and will error with the message below if library loading was skip ped
986 CronetLibraryLoader.ensureInitialized(getContext(), builder); 987 CronetLibraryLoader.ensureInitialized(getContext(), builder);
987 fail("Native library should not be loaded"); 988 fail("Native library should not be loaded");
988 } catch (UnsatisfiedLinkError e) { 989 } catch (UnsatisfiedLinkError e) {
989 assertTrue(loader.wasCalled()); 990 assertTrue(loader.wasCalled());
990 } 991 }
991 } 992 }
992 } 993 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698