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

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

Issue 2583933003: Replace deprecated Android java test annotations (Closed)
Patch Set: Rebase again :( Created 3 years, 12 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 static org.chromium.base.CollectionUtil.newHashSet; 7 import static org.chromium.base.CollectionUtil.newHashSet;
8 8
9 import android.os.ConditionVariable; 9 import android.os.ConditionVariable;
10 import android.test.suitebuilder.annotation.SmallTest; 10 import android.support.test.filters.SmallTest;
11 11
12 import org.chromium.base.test.util.DisabledTest; 12 import org.chromium.base.test.util.DisabledTest;
13 import org.chromium.base.test.util.Feature; 13 import org.chromium.base.test.util.Feature;
14 import org.chromium.net.MetricsTestUtil.TestRequestFinishedListener; 14 import org.chromium.net.MetricsTestUtil.TestRequestFinishedListener;
15 import org.chromium.net.TestBidirectionalStreamCallback.FailureType; 15 import org.chromium.net.TestBidirectionalStreamCallback.FailureType;
16 import org.chromium.net.TestBidirectionalStreamCallback.ResponseStep; 16 import org.chromium.net.TestBidirectionalStreamCallback.ResponseStep;
17 import org.chromium.net.impl.CronetBidirectionalStream; 17 import org.chromium.net.impl.CronetBidirectionalStream;
18 import org.chromium.net.impl.UrlResponseInfoImpl; 18 import org.chromium.net.impl.UrlResponseInfoImpl;
19 19
20 import java.nio.ByteBuffer; 20 import java.nio.ByteBuffer;
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 private static String bufferContentsToString(ByteBuffer byteBuffer, int star t, int end) { 1450 private static String bufferContentsToString(ByteBuffer byteBuffer, int star t, int end) {
1451 // Use a duplicate to avoid modifying byteBuffer. 1451 // Use a duplicate to avoid modifying byteBuffer.
1452 ByteBuffer duplicate = byteBuffer.duplicate(); 1452 ByteBuffer duplicate = byteBuffer.duplicate();
1453 duplicate.position(start); 1453 duplicate.position(start);
1454 duplicate.limit(end); 1454 duplicate.limit(end);
1455 byte[] contents = new byte[duplicate.remaining()]; 1455 byte[] contents = new byte[duplicate.remaining()];
1456 duplicate.get(contents); 1456 duplicate.get(contents);
1457 return new String(contents); 1457 return new String(contents);
1458 } 1458 }
1459 } 1459 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698