| 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.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 Loading... |
| 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 } |
| OLD | NEW |