| OLD | NEW |
| 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 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 builder.enableHTTP2(false); | 1259 builder.enableHTTP2(false); |
| 1260 builder.enableQUIC(true); | 1260 builder.enableQUIC(true); |
| 1261 builder.enableSDCH(true); | 1261 builder.enableSDCH(true); |
| 1262 builder.addQuicHint("example.com", 12, 34); | 1262 builder.addQuicHint("example.com", 12, 34); |
| 1263 builder.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_IN_MEMORY, 54321
); | 1263 builder.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_IN_MEMORY, 54321
); |
| 1264 builder.enableDataReductionProxy("abcd"); | 1264 builder.enableDataReductionProxy("abcd"); |
| 1265 builder.setUserAgent("efgh"); | 1265 builder.setUserAgent("efgh"); |
| 1266 builder.setExperimentalOptions("ijkl"); | 1266 builder.setExperimentalOptions("ijkl"); |
| 1267 builder.setDataReductionProxyOptions("mnop", "qrst", "uvwx"); | 1267 builder.setDataReductionProxyOptions("mnop", "qrst", "uvwx"); |
| 1268 builder.setStoragePath(CronetTestFramework.getTestStorage(getContext()))
; | 1268 builder.setStoragePath(CronetTestFramework.getTestStorage(getContext()))
; |
| 1269 builder.enablePublicKeyPinningBypassForLocalTrustAnchors(false); | |
| 1270 nativeVerifyUrlRequestContextConfig( | 1269 nativeVerifyUrlRequestContextConfig( |
| 1271 CronetUrlRequestContext.createNativeUrlRequestContextConfig(getC
ontext(), builder), | 1270 CronetUrlRequestContext.createNativeUrlRequestContextConfig(getC
ontext(), builder), |
| 1272 CronetTestFramework.getTestStorage(getContext())); | 1271 CronetTestFramework.getTestStorage(getContext())); |
| 1273 } | 1272 } |
| 1274 | 1273 |
| 1275 // Verifies that CronetEngine.Builder config from testCronetEngineBuilderCon
fig() is properly | 1274 // Verifies that CronetEngine.Builder config from testCronetEngineBuilderCon
fig() is properly |
| 1276 // translated to a native UrlRequestContextConfig. | 1275 // translated to a native UrlRequestContextConfig. |
| 1277 private static native void nativeVerifyUrlRequestContextConfig(long config,
String storagePath); | 1276 private static native void nativeVerifyUrlRequestContextConfig(long config,
String storagePath); |
| 1278 | 1277 |
| 1279 private static class TestBadLibraryLoader extends CronetEngine.Builder.Libra
ryLoader { | 1278 private static class TestBadLibraryLoader extends CronetEngine.Builder.Libra
ryLoader { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1325 } | 1324 } |
| 1326 }.start(); | 1325 }.start(); |
| 1327 otherThreadDone.block(); | 1326 otherThreadDone.block(); |
| 1328 builder.build().shutdown(); | 1327 builder.build().shutdown(); |
| 1329 uiThreadDone.open(); | 1328 uiThreadDone.open(); |
| 1330 } | 1329 } |
| 1331 }); | 1330 }); |
| 1332 assertTrue(uiThreadDone.block(1000)); | 1331 assertTrue(uiThreadDone.block(1000)); |
| 1333 } | 1332 } |
| 1334 } | 1333 } |
| OLD | NEW |