| 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.cronet_test_apk; | 5 package org.chromium.net; |
| 6 | 6 |
| 7 import android.test.suitebuilder.annotation.SmallTest; | 7 import android.test.suitebuilder.annotation.SmallTest; |
| 8 | 8 |
| 9 import org.chromium.base.test.util.Feature; | 9 import org.chromium.base.test.util.Feature; |
| 10 import org.chromium.net.HttpUrlRequest; | |
| 11 import org.chromium.net.HttpUrlRequestFactory; | |
| 12 | 10 |
| 13 import java.util.HashMap; | 11 import java.util.HashMap; |
| 14 | 12 |
| 15 /** | 13 /** |
| 16 * Tests that make sure ChromiumUrlRequestContext initialization will not | 14 * Tests that make sure ChromiumUrlRequestContext initialization will not |
| 17 * affect embedders' ability to make requests. | 15 * affect embedders' ability to make requests. |
| 18 */ | 16 */ |
| 19 public class ContextInitTest extends CronetTestBase { | 17 public class ContextInitTest extends CronetTestBase { |
| 20 // URL used for base tests. | 18 // URL used for base tests. |
| 21 private static final String URL = "http://127.0.0.1:8000"; | 19 private static final String URL = "http://127.0.0.1:8000"; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 private TestHttpUrlRequestListener makeRequest( | 122 private TestHttpUrlRequestListener makeRequest( |
| 125 HttpUrlRequestFactory factory, String url) { | 123 HttpUrlRequestFactory factory, String url) { |
| 126 HashMap<String, String> headers = new HashMap<String, String>(); | 124 HashMap<String, String> headers = new HashMap<String, String>(); |
| 127 TestHttpUrlRequestListener listener = new TestHttpUrlRequestListener(); | 125 TestHttpUrlRequestListener listener = new TestHttpUrlRequestListener(); |
| 128 HttpUrlRequest request = factory.createRequest( | 126 HttpUrlRequest request = factory.createRequest( |
| 129 url, HttpUrlRequest.REQUEST_PRIORITY_MEDIUM, headers, listener); | 127 url, HttpUrlRequest.REQUEST_PRIORITY_MEDIUM, headers, listener); |
| 130 request.start(); | 128 request.start(); |
| 131 return listener; | 129 return listener; |
| 132 } | 130 } |
| 133 } | 131 } |
| OLD | NEW |