| 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.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 Loading... |
| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 176 |
| 175 @Target(ElementType.METHOD) | 177 @Target(ElementType.METHOD) |
| 176 @Retention(RetentionPolicy.RUNTIME) | 178 @Retention(RetentionPolicy.RUNTIME) |
| 177 public @interface OnlyRunCronetHttpURLConnection { | 179 public @interface OnlyRunCronetHttpURLConnection { |
| 178 } | 180 } |
| 179 | 181 |
| 180 @Target(ElementType.METHOD) | 182 @Target(ElementType.METHOD) |
| 181 @Retention(RetentionPolicy.RUNTIME) | 183 @Retention(RetentionPolicy.RUNTIME) |
| 182 public @interface OnlyRunNativeCronet {} | 184 public @interface OnlyRunNativeCronet {} |
| 183 } | 185 } |
| OLD | NEW |