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

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

Issue 2406273002: [Cronet] Test the libcronet that's shipped, not libcronet_test (Closed)
Patch Set: address two remaining comments 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.content.Context; 7 import android.content.Context;
8 import android.os.Environment; 8 import android.os.Environment;
9 9
10 import static junit.framework.Assert.assertEquals; 10 import static junit.framework.Assert.assertEquals;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } else if (CACHE_IN_MEMORY.equals(cacheString)) { 187 } else if (CACHE_IN_MEMORY.equals(cacheString)) {
188 cronetEngineBuilder.enableHttpCache( 188 cronetEngineBuilder.enableHttpCache(
189 CronetEngine.Builder.HTTP_CACHE_IN_MEMORY, 100 * 1024); 189 CronetEngine.Builder.HTTP_CACHE_IN_MEMORY, 100 * 1024);
190 } 190 }
191 191
192 String sdchString = getCommandLineArg(SDCH_KEY); 192 String sdchString = getCommandLineArg(SDCH_KEY);
193 if (SDCH_ENABLE.equals(sdchString)) { 193 if (SDCH_ENABLE.equals(sdchString)) {
194 cronetEngineBuilder.enableSdch(true); 194 cronetEngineBuilder.enableSdch(true);
195 } 195 }
196 196
197 // Setting this here so it isn't overridden on the command line
198 cronetEngineBuilder.setLibraryName("cronet_tests");
199 return cronetEngineBuilder; 197 return cronetEngineBuilder;
200 } 198 }
201 199
202 // Helper function to initialize Cronet engine. Also used in testing. 200 // Helper function to initialize Cronet engine. Also used in testing.
203 public CronetEngine initCronetEngine() { 201 public CronetEngine initCronetEngine() {
204 return mCronetEngineBuilder.build(); 202 return mCronetEngineBuilder.build();
205 } 203 }
206 204
207 private String getCommandLineArg(String key) { 205 private String getCommandLineArg(String key) {
208 if (mCommandLine != null) { 206 if (mCommandLine != null) {
(...skipping 13 matching lines...) Expand all
222 false); 220 false);
223 } 221 }
224 } 222 }
225 223
226 public void stopNetLog() { 224 public void stopNetLog() {
227 if (mCronetEngine != null) { 225 if (mCronetEngine != null) {
228 mCronetEngine.stopNetLog(); 226 mCronetEngine.stopNetLog();
229 } 227 }
230 } 228 }
231 } 229 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698