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

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

Issue 884003004: Rename org.chromium.cronet_test_apk to org.chromium.net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 10 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.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.PathUtils; 9 import org.chromium.base.PathUtils;
10 import org.chromium.base.test.util.Feature; 10 import org.chromium.base.test.util.Feature;
11 import org.chromium.net.HttpUrlRequest;
12 import org.chromium.net.HttpUrlRequestFactoryConfig;
13 11
14 import java.io.File; 12 import java.io.File;
15 import java.util.HashMap; 13 import java.util.HashMap;
16 14
17 /** 15 /**
18 * Example test that just starts the cronet sample. 16 * Example test that just starts the cronet sample.
19 */ 17 */
20 public class CronetUrlTest extends CronetTestBase { 18 public class CronetUrlTest extends CronetTestBase {
21 // URL used for base tests. 19 // URL used for base tests.
22 private static final String URL = "http://127.0.0.1:8000"; 20 private static final String URL = "http://127.0.0.1:8000";
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 URL, HttpUrlRequest.REQUEST_PRIORITY_MEDIUM, headers, listener); 198 URL, HttpUrlRequest.REQUEST_PRIORITY_MEDIUM, headers, listener);
201 request.setHttpMethod("HEAD"); 199 request.setHttpMethod("HEAD");
202 request.start(); 200 request.start();
203 listener.blockForComplete(); 201 listener.blockForComplete();
204 assertEquals(200, listener.mHttpStatusCode); 202 assertEquals(200, listener.mHttpStatusCode);
205 // HEAD requests do not get any response data and Content-Length must be 203 // HEAD requests do not get any response data and Content-Length must be
206 // ignored. 204 // ignored.
207 assertEquals(0, listener.mResponseAsBytes.length); 205 assertEquals(0, listener.mResponseAsBytes.length);
208 } 206 }
209 } 207 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698