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

Unified Diff: components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetFixedModeOutputStreamTest.java

Issue 2055083002: [Cronet] Fix CronetFixedModeOutputStream to not write more bytes than specified (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add @VisibleForTesting Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetFixedModeOutputStreamTest.java
diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetFixedModeOutputStreamTest.java b/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetFixedModeOutputStreamTest.java
index 3dddc7397f85d78d7a221cbebae90383be18e211..af77e377a4c035546033173e938ad292f746a970 100644
--- a/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetFixedModeOutputStreamTest.java
+++ b/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetFixedModeOutputStreamTest.java
@@ -275,14 +275,14 @@ public class CronetFixedModeOutputStreamTest extends CronetTestBase {
@SmallTest
@Feature({"Cronet"})
@OnlyRunCronetHttpURLConnection
- public void testLargeDataMoreThanNativeBufferSize()
- throws Exception {
+ public void testJavaBufferSizeLargerThanNativeBufferSize() throws Exception {
// Set an internal buffer of size larger than the buffer size used
// in network stack internally.
// Normal stream uses 16384, QUIC uses 14520, and SPDY uses 16384.
- CronetFixedModeOutputStream.setDefaultBufferLengthForTesting(17384);
+ CronetFixedModeOutputStream.setDefaultBufferLengthForTesting(18384);
pauljensen 2016/06/14 12:50:31 why the buffer size change?
xunjieli 2016/06/14 13:12:48 That's a very good question. (I should have commen
testFixedLengthStreamingModeLargeDataWriteOneByte();
testFixedLengthStreamingModeLargeData();
+ testOneMassiveWrite();
pauljensen 2016/06/14 12:50:31 can you add a comment about what this call does?
xunjieli 2016/06/14 13:12:48 It's a test method. I've added a comment.
}
@SmallTest

Powered by Google App Engine
This is Rietveld 408576698