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 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 private static final String LOOPBACK_ADDRESS = "127.0.0.1"; | 23 private static final String LOOPBACK_ADDRESS = "127.0.0.1"; |
24 | 24 |
25 private CronetTestFramework mCronetTestFramework; | 25 private CronetTestFramework mCronetTestFramework; |
26 // {@code true} when test is being run against system HttpURLConnection impl
ementation. | 26 // {@code true} when test is being run against system HttpURLConnection impl
ementation. |
27 private boolean mTestingSystemHttpURLConnection; | 27 private boolean mTestingSystemHttpURLConnection; |
28 private boolean mTestingJavaImpl = false; | 28 private boolean mTestingJavaImpl = false; |
29 | 29 |
30 @Override | 30 @Override |
31 protected void setUp() throws Exception { | 31 protected void setUp() throws Exception { |
32 super.setUp(); | 32 super.setUp(); |
33 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX, g
etContext()); | 33 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX); |
34 CronetTestFramework.prepareTestStorage(getContext()); | 34 CronetTestFramework.prepareTestStorage(getContext()); |
35 } | 35 } |
36 | 36 |
37 /** | 37 /** |
38 * Starts the CronetTest framework. | 38 * Starts the CronetTest framework. |
39 */ | 39 */ |
40 protected CronetTestFramework startCronetTestFramework() { | 40 protected CronetTestFramework startCronetTestFramework() { |
41 return startCronetTestFrameworkWithUrlAndCronetEngineBuilder(null, null)
; | 41 return startCronetTestFrameworkWithUrlAndCronetEngineBuilder(null, null)
; |
42 } | 42 } |
43 | 43 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 174 |
175 @Target(ElementType.METHOD) | 175 @Target(ElementType.METHOD) |
176 @Retention(RetentionPolicy.RUNTIME) | 176 @Retention(RetentionPolicy.RUNTIME) |
177 public @interface OnlyRunCronetHttpURLConnection { | 177 public @interface OnlyRunCronetHttpURLConnection { |
178 } | 178 } |
179 | 179 |
180 @Target(ElementType.METHOD) | 180 @Target(ElementType.METHOD) |
181 @Retention(RetentionPolicy.RUNTIME) | 181 @Retention(RetentionPolicy.RUNTIME) |
182 public @interface OnlyRunNativeCronet {} | 182 public @interface OnlyRunNativeCronet {} |
183 } | 183 } |
OLD | NEW |