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

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

Issue 2406273002: [Cronet] Test the libcronet that's shipped, not libcronet_test (Closed)
Patch Set: fix shutdown race Created 4 years, 1 month 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 android.test.AndroidTestCase; 7 import android.test.AndroidTestCase;
8 8
9 import org.chromium.base.ContextUtils; 9 import org.chromium.base.ContextUtils;
10 import org.chromium.base.PathUtils; 10 import org.chromium.base.PathUtils;
(...skipping 16 matching lines...) Expand all
27 private static final String LOOPBACK_ADDRESS = "127.0.0.1"; 27 private static final String LOOPBACK_ADDRESS = "127.0.0.1";
28 28
29 private CronetTestFramework mCronetTestFramework; 29 private CronetTestFramework mCronetTestFramework;
30 // {@code true} when test is being run against system HttpURLConnection impl ementation. 30 // {@code true} when test is being run against system HttpURLConnection impl ementation.
31 private boolean mTestingSystemHttpURLConnection; 31 private boolean mTestingSystemHttpURLConnection;
32 private boolean mTestingJavaImpl = false; 32 private boolean mTestingJavaImpl = false;
33 33
34 @Override 34 @Override
35 protected void setUp() throws Exception { 35 protected void setUp() throws Exception {
36 super.setUp(); 36 super.setUp();
37 System.loadLibrary("cronet_tests");
37 ContextUtils.initApplicationContext(getContext().getApplicationContext() ); 38 ContextUtils.initApplicationContext(getContext().getApplicationContext() );
39 ContextUtils.initApplicationContextForNative();
38 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX); 40 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX);
39 CronetTestFramework.prepareTestStorage(getContext()); 41 CronetTestFramework.prepareTestStorage(getContext());
40 } 42 }
41 43
42 /** 44 /**
43 * Starts the CronetTest framework. 45 * Starts the CronetTest framework.
44 */ 46 */
45 protected CronetTestFramework startCronetTestFramework() { 47 protected CronetTestFramework startCronetTestFramework() {
46 return startCronetTestFrameworkWithUrlAndCronetEngineBuilder(null, null) ; 48 return startCronetTestFrameworkWithUrlAndCronetEngineBuilder(null, null) ;
47 } 49 }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 175
174 @Target(ElementType.METHOD) 176 @Target(ElementType.METHOD)
175 @Retention(RetentionPolicy.RUNTIME) 177 @Retention(RetentionPolicy.RUNTIME)
176 public @interface OnlyRunCronetHttpURLConnection { 178 public @interface OnlyRunCronetHttpURLConnection {
177 } 179 }
178 180
179 @Target(ElementType.METHOD) 181 @Target(ElementType.METHOD)
180 @Retention(RetentionPolicy.RUNTIME) 182 @Retention(RetentionPolicy.RUNTIME)
181 public @interface OnlyRunNativeCronet {} 183 public @interface OnlyRunNativeCronet {}
182 } 184 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698