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

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

Issue 1849753002: [Cronet] Separate Cronet implementation and API by package name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 4 years, 5 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.net; 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.impl.ChromiumUrlRequest;
10 11
11 import java.io.ByteArrayInputStream; 12 import java.io.ByteArrayInputStream;
12 import java.io.IOException; 13 import java.io.IOException;
13 import java.io.InputStream; 14 import java.io.InputStream;
14 import java.nio.ByteBuffer; 15 import java.nio.ByteBuffer;
15 import java.nio.channels.Channels; 16 import java.nio.channels.Channels;
16 import java.nio.channels.ReadableByteChannel; 17 import java.nio.channels.ReadableByteChannel;
17 import java.util.HashMap; 18 import java.util.HashMap;
18 import java.util.concurrent.Executors; 19 import java.util.concurrent.Executors;
19 20
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 // Upload a single empty chunk. 340 // Upload a single empty chunk.
340 ByteBuffer byteBuffer = ByteBuffer.allocateDirect(0); 341 ByteBuffer byteBuffer = ByteBuffer.allocateDirect(0);
341 request.appendChunk(byteBuffer, true); 342 request.appendChunk(byteBuffer, true);
342 343
343 listener.blockForComplete(); 344 listener.blockForComplete();
344 345
345 assertEquals(200, listener.mHttpStatusCode); 346 assertEquals(200, listener.mHttpStatusCode);
346 assertEquals("", listener.mResponseAsString); 347 assertEquals("", listener.mResponseAsString);
347 } 348 }
348 } 349 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698