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

Unified Diff: components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlTest.java

Issue 1363723002: [Cronet] Create Builders, rename UrlRequestContext to CronetEngine (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make old API work without renaming Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlTest.java
diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlTest.java b/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlTest.java
index 945ec7fd340f0337bab192de0aeb889ae280ef87..f14e07ecef40d7b75830bb123c9c13596df128fb 100644
--- a/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlTest.java
+++ b/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlTest.java
@@ -61,8 +61,7 @@ public class CronetUrlTest extends CronetTestBase {
File directory = new File(PathUtils.getDataDirectory(context));
File file = File.createTempFile("cronet", "json", directory);
HttpUrlRequestFactory factory = HttpUrlRequestFactory.createFactory(
- context,
- new UrlRequestContextConfig().setLibraryName("cronet_tests"));
+ new CronetEngine.Builder(context).setLibraryName("cronet_tests"));
mef 2015/10/02 16:46:58 will this work?
pauljensen 2015/10/02 18:23:15 I reverted this file.
// Start NetLog immediately after the request context is created to make
// sure that the call won't crash the app even when the native request
// context is not fully initialized. See crbug.com/470196.
@@ -135,7 +134,7 @@ public class CronetUrlTest extends CronetTestBase {
@SmallTest
@Feature({"Cronet"})
public void testLegacyLoadUrl() throws Exception {
- HttpUrlRequestFactoryConfig config = new HttpUrlRequestFactoryConfig();
+ HttpUrlRequestFactoryConfig config = new HttpUrlRequestFactoryConfig(null);
mef 2015/10/02 16:46:58 Can we get rid of null?
pauljensen 2015/10/02 18:23:15 I reverted this file.
config.enableLegacyMode(true);
// TODO(mef) fix tests so that library isn't loaded for legacy stack
config.setLibraryName("cronet_tests");

Powered by Google App Engine
This is Rietveld 408576698