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 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; |
| 11 import org.chromium.net.impl.JavaCronetEngine; |
| 12 import org.chromium.net.impl.UserAgent; |
11 | 13 |
12 import java.lang.annotation.ElementType; | 14 import java.lang.annotation.ElementType; |
13 import java.lang.annotation.Retention; | 15 import java.lang.annotation.Retention; |
14 import java.lang.annotation.RetentionPolicy; | 16 import java.lang.annotation.RetentionPolicy; |
15 import java.lang.annotation.Target; | 17 import java.lang.annotation.Target; |
16 import java.lang.reflect.AnnotatedElement; | 18 import java.lang.reflect.AnnotatedElement; |
17 import java.net.URL; | 19 import java.net.URL; |
18 | 20 |
19 /** | 21 /** |
20 * Base test class for all CronetTest based tests. | 22 * Base test class for all CronetTest based tests. |
(...skipping 28 matching lines...) Expand all Loading... |
49 */ | 51 */ |
50 protected CronetTestFramework startCronetTestFrameworkWithUrl(String url) { | 52 protected CronetTestFramework startCronetTestFrameworkWithUrl(String url) { |
51 return startCronetTestFrameworkWithUrlAndCronetEngineBuilder(url, null); | 53 return startCronetTestFrameworkWithUrlAndCronetEngineBuilder(url, null); |
52 } | 54 } |
53 | 55 |
54 /** | 56 /** |
55 * Starts the CronetTest framework using the provided CronetEngine.Builder | 57 * Starts the CronetTest framework using the provided CronetEngine.Builder |
56 * and loads the given URL. The URL can be null. | 58 * and loads the given URL. The URL can be null. |
57 */ | 59 */ |
58 protected CronetTestFramework startCronetTestFrameworkWithUrlAndCronetEngine
Builder( | 60 protected CronetTestFramework startCronetTestFrameworkWithUrlAndCronetEngine
Builder( |
59 String url, CronetEngine.Builder builder) { | 61 String url, ExperimentalCronetEngine.Builder builder) { |
60 mCronetTestFramework = new CronetTestFramework(url, null, getContext(),
builder); | 62 mCronetTestFramework = new CronetTestFramework(url, null, getContext(),
builder); |
61 return mCronetTestFramework; | 63 return mCronetTestFramework; |
62 } | 64 } |
63 | 65 |
64 /** | 66 /** |
65 * Starts the CronetTest framework appending the provided command line | 67 * Starts the CronetTest framework appending the provided command line |
66 * arguments and loads the given URL. The URL can be null. | 68 * arguments and loads the given URL. The URL can be null. |
67 */ | 69 */ |
68 protected CronetTestFramework startCronetTestFrameworkWithUrlAndCommandLineA
rgs( | 70 protected CronetTestFramework startCronetTestFrameworkWithUrlAndCommandLineA
rgs( |
69 String url, String[] commandLineArgs) { | 71 String url, String[] commandLineArgs) { |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 166 |
165 @Target(ElementType.METHOD) | 167 @Target(ElementType.METHOD) |
166 @Retention(RetentionPolicy.RUNTIME) | 168 @Retention(RetentionPolicy.RUNTIME) |
167 public @interface OnlyRunCronetHttpURLConnection { | 169 public @interface OnlyRunCronetHttpURLConnection { |
168 } | 170 } |
169 | 171 |
170 @Target(ElementType.METHOD) | 172 @Target(ElementType.METHOD) |
171 @Retention(RetentionPolicy.RUNTIME) | 173 @Retention(RetentionPolicy.RUNTIME) |
172 public @interface OnlyRunNativeCronet {} | 174 public @interface OnlyRunNativeCronet {} |
173 } | 175 } |
OLD | NEW |