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

Side by Side Diff: components/cronet/android/test/javatests/src/org/chromium/net/ChunkedWritableByteChannelTest.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.InstrumentationTestCase; 7 import android.test.InstrumentationTestCase;
8 import android.test.suitebuilder.annotation.SmallTest; 8 import android.test.suitebuilder.annotation.SmallTest;
9 9
10 import org.chromium.base.test.util.Feature; 10 import org.chromium.base.test.util.Feature;
11 import org.chromium.net.ChunkedWritableByteChannel;
12 11
13 import java.io.IOException; 12 import java.io.IOException;
14 import java.nio.ByteBuffer; 13 import java.nio.ByteBuffer;
15 import java.nio.channels.ClosedChannelException; 14 import java.nio.channels.ClosedChannelException;
16 import java.nio.charset.Charset; 15 import java.nio.charset.Charset;
17 import java.util.Arrays; 16 import java.util.Arrays;
18 17
19 /** 18 /**
20 * Tests for {@link ChunkedWritableByteChannel} 19 * Tests for {@link ChunkedWritableByteChannel}
21 */ 20 */
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 @SmallTest 72 @SmallTest
74 @Feature({"Cronet"}) 73 @Feature({"Cronet"})
75 public void testCapacityGrows() throws Exception { 74 public void testCapacityGrows() throws Exception {
76 mChannel.setCapacity(123); 75 mChannel.setCapacity(123);
77 byte[] data = new byte[1234]; 76 byte[] data = new byte[1234];
78 Arrays.fill(data, (byte) 'G'); 77 Arrays.fill(data, (byte) 'G');
79 mChannel.write(ByteBuffer.wrap(data)); 78 mChannel.write(ByteBuffer.wrap(data));
80 assertTrue(Arrays.equals(data, mChannel.getBytes())); 79 assertTrue(Arrays.equals(data, mChannel.getBytes()));
81 } 80 }
82 } 81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698