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

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

Issue 2339223002: Cronet API Refactoring (Closed)
Patch Set: Rebased onto Charles change + Paul's Comments Created 4 years, 3 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 android.test.AndroidTestCase; 7 import android.test.AndroidTestCase;
8 8
9 import org.chromium.base.PathUtils; 9 import org.chromium.base.PathUtils;
10 import org.chromium.net.impl.JavaCronetEngine;
11 import org.chromium.net.impl.UserAgent;
10 12
11 import java.lang.annotation.ElementType; 13 import java.lang.annotation.ElementType;
12 import java.lang.annotation.Retention; 14 import java.lang.annotation.Retention;
13 import java.lang.annotation.RetentionPolicy; 15 import java.lang.annotation.RetentionPolicy;
14 import java.lang.annotation.Target; 16 import java.lang.annotation.Target;
15 import java.lang.reflect.AnnotatedElement; 17 import java.lang.reflect.AnnotatedElement;
16 import java.net.URL; 18 import java.net.URL;
17 19
18 /** 20 /**
19 * Base test class for all CronetTest based tests. 21 * Base test class for all CronetTest based tests.
(...skipping 27 matching lines...) Expand all
47 */ 49 */
48 protected CronetTestFramework startCronetTestFrameworkWithUrl(String url) { 50 protected CronetTestFramework startCronetTestFrameworkWithUrl(String url) {
49 return startCronetTestFrameworkWithUrlAndCronetEngineBuilder(url, null); 51 return startCronetTestFrameworkWithUrlAndCronetEngineBuilder(url, null);
50 } 52 }
51 53
52 /** 54 /**
53 * Starts the CronetTest framework using the provided CronetEngine.Builder 55 * Starts the CronetTest framework using the provided CronetEngine.Builder
54 * and loads the given URL. The URL can be null. 56 * and loads the given URL. The URL can be null.
55 */ 57 */
56 protected CronetTestFramework startCronetTestFrameworkWithUrlAndCronetEngine Builder( 58 protected CronetTestFramework startCronetTestFrameworkWithUrlAndCronetEngine Builder(
57 String url, CronetEngine.Builder builder) { 59 String url, ExperimentalCronetEngine.Builder builder) {
58 mCronetTestFramework = new CronetTestFramework(url, null, getContext(), builder); 60 mCronetTestFramework = new CronetTestFramework(url, null, getContext(), builder);
59 return mCronetTestFramework; 61 return mCronetTestFramework;
60 } 62 }
61 63
62 /** 64 /**
63 * Starts the CronetTest framework appending the provided command line 65 * Starts the CronetTest framework appending the provided command line
64 * arguments and loads the given URL. The URL can be null. 66 * arguments and loads the given URL. The URL can be null.
65 */ 67 */
66 protected CronetTestFramework startCronetTestFrameworkWithUrlAndCommandLineA rgs( 68 protected CronetTestFramework startCronetTestFrameworkWithUrlAndCommandLineA rgs(
67 String url, String[] commandLineArgs) { 69 String url, String[] commandLineArgs) {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 164
163 @Target(ElementType.METHOD) 165 @Target(ElementType.METHOD)
164 @Retention(RetentionPolicy.RUNTIME) 166 @Retention(RetentionPolicy.RUNTIME)
165 public @interface OnlyRunCronetHttpURLConnection { 167 public @interface OnlyRunCronetHttpURLConnection {
166 } 168 }
167 169
168 @Target(ElementType.METHOD) 170 @Target(ElementType.METHOD)
169 @Retention(RetentionPolicy.RUNTIME) 171 @Retention(RetentionPolicy.RUNTIME)
170 public @interface OnlyRunNativeCronet {} 172 public @interface OnlyRunNativeCronet {}
171 } 173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698