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

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

Issue 1928753002: Increase buffer size in CronetFixedModeOutputStream to 16kB (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « components/cronet/android/java/src/org/chromium/net/urlconnection/CronetFixedModeOutputStream.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d90b48433e9eb2de335b27dd6b8b1e617909934f..3dddc7397f85d78d7a221cbebae90383be18e211 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
@@ -225,6 +225,7 @@ public class CronetFixedModeOutputStreamTest extends CronetTestBase {
(HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
connection.setRequestMethod("POST");
+ // largeData is 1.8 MB.
byte[] largeData = TestUtil.getLargeData();
connection.setFixedLengthStreamingMode(largeData.length);
OutputStream out = connection.getOutputStream();
@@ -239,6 +240,7 @@ public class CronetFixedModeOutputStreamTest extends CronetTestBase {
}
out.write(largeData, totalBytesWritten, bytesToWrite);
totalBytesWritten += bytesToWrite;
+ // About 5th iteration of this loop, bytesToWrite will be bigger than 16384.
bytesToWrite *= 2;
}
assertEquals(200, connection.getResponseCode());
@@ -277,7 +279,7 @@ public class CronetFixedModeOutputStreamTest extends CronetTestBase {
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 2852.
+ // Normal stream uses 16384, QUIC uses 14520, and SPDY uses 16384.
CronetFixedModeOutputStream.setDefaultBufferLengthForTesting(17384);
testFixedLengthStreamingModeLargeDataWriteOneByte();
testFixedLengthStreamingModeLargeData();
« no previous file with comments | « components/cronet/android/java/src/org/chromium/net/urlconnection/CronetFixedModeOutputStream.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698