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

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

Issue 1124333003: Rename CronetUploadDataStreamAdapter to CronetUploadDataStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/CronetUploadTest.java
diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/CronetUploadTest.java b/components/cronet/android/test/javatests/src/org/chromium/net/CronetUploadTest.java
index 074eaad7c5e32f1a34f89177894b0223331a5c8d..8fa4fde87fa1c80e52f465c9bce41ebfaf907ee7 100644
--- a/components/cronet/android/test/javatests/src/org/chromium/net/CronetUploadTest.java
+++ b/components/cronet/android/test/javatests/src/org/chromium/net/CronetUploadTest.java
@@ -32,7 +32,7 @@ public class CronetUploadTest extends CronetTestBase {
mDataProvider = new TestDrivenDataProvider(executor, reads);
mUploadDataStream = new CronetUploadDataStream(mDataProvider, executor);
mHandler = new TestUploadDataStreamHandler(
- mUploadDataStream.createAdapterForTesting());
+ mUploadDataStream.createUploadDataStreamForTesting());
}
@Override
@@ -47,7 +47,8 @@ public class CronetUploadTest extends CronetTestBase {
* before the rewind completes, init blocks.
*/
@SmallTest
- @Feature({"Cronet"})
+ @Feature({
+ "Cronet" })
xunjieli 2015/05/08 20:11:28 Strange that this formatting got changed somehow.
mmenke 2015/05/08 20:24:19 Done. No idea how that happened.
public void testInitTriggersRewindAndInitBeforeRewindCompletes()
throws Exception {
// Init completes synchronously and read succeeds.
@@ -96,7 +97,8 @@ public class CronetUploadTest extends CronetTestBase {
* after the rewind completes, init does not block.
*/
@SmallTest
- @Feature({"Cronet"})
+ @Feature({
+ "Cronet" })
public void testInitTriggersRewindAndInitAfterRewindCompletes()
throws Exception {
// Init completes synchronously and read succeeds.
@@ -144,7 +146,8 @@ public class CronetUploadTest extends CronetTestBase {
* read completes.
*/
@SmallTest
- @Feature({"Cronet"})
+ @Feature({
+ "Cronet" })
public void testReadCompleteTriggerRewind() throws Exception {
// Reset and init before read completes.
assertTrue(mHandler.init());
@@ -178,7 +181,8 @@ public class CronetUploadTest extends CronetTestBase {
* except that this test invokes reset and init again in the end.
*/
@SmallTest
- @Feature({"Cronet"})
+ @Feature({
+ "Cronet" })
public void testReadCompleteTriggerRewindOnlyOneRewind() throws Exception {
testReadCompleteTriggerRewind();
// Reset and Init again, no rewind should happen.
@@ -195,7 +199,8 @@ public class CronetUploadTest extends CronetTestBase {
* that a following init triggers rewind.
*/
@SmallTest
- @Feature({"Cronet"})
+ @Feature({
+ "Cronet" })
public void testResetBeforeReadCompleteAndInitTriggerRewind()
throws Exception {
// Reset before read completes. Rewind is not triggered.
@@ -230,7 +235,8 @@ public class CronetUploadTest extends CronetTestBase {
* we are interested in the latter case.
*/
@SmallTest
- @Feature({"Cronet"})
+ @Feature({
+ "Cronet" })
public void testDestroyAdapterBeforeReadComplete()
throws Exception {
// Start a read and wait for it to be pending.
@@ -239,12 +245,11 @@ public class CronetUploadTest extends CronetTestBase {
mDataProvider.waitForReadRequest();
mHandler.checkReadCallbackNotInvoked();
- // Destroy the C++ TestUploadDataStreamHandler. The handler owns the
- // CronetUploadDataStreamAdapter, which this will cause it to destroy on
- // the network thread. Destroying the adapter will result in calling
- // the CronetUploadDataSteam's onAdapterDestroyed() method on its
- // executor thread, which will then destroy the
- // CronetUploadDataStreamDelegate.
+ // Destroy the C++ TestUploadDataStreamHandler. The handler will then
xunjieli 2015/05/08 20:11:27 nit: there are two spaces after the dot.
mmenke 2015/05/08 20:24:19 Done.
+ // destroy the C++ CronetUploadDataStream it owns on the network thread.
+ // That will result in calling the Java CronetUploadDataSteam's
+ // onCanceled() method on its executor thread, which will then destroy
+ // the CronetUploadDataStreamAdapter.
mHandler.destroyNativeObjects();
// Make the read complete should not encounter a crash.
@@ -262,7 +267,8 @@ public class CronetUploadTest extends CronetTestBase {
* we are interested in the latter case.
*/
@SmallTest
- @Feature({"Cronet"})
+ @Feature({
+ "Cronet" })
public void testDestroyAdapterBeforeRewindComplete()
throws Exception {
// Start a read and wait for it to complete.
@@ -284,12 +290,11 @@ public class CronetUploadTest extends CronetTestBase {
mDataProvider.waitForRewindRequest();
mHandler.checkInitCallbackNotInvoked();
- // Destroy the C++ TestUploadDataStreamHandler. The handler owns the
- // CronetUploadDataStreamAdapter, which this will cause it to destroy on
- // the network thread. Destroying the adapter will result in calling
- // the CronetUploadDataSteam's onAdapterDestroyed() method on its
- // executor thread, which will then destroy the
- // CronetUploadDataStreamDelegate.
+ // Destroy the C++ TestUploadDataStreamHandler. The handler will then
xunjieli 2015/05/08 20:11:28 nit: there are two spaces after the dot.
mmenke 2015/05/08 20:24:19 Done.
+ // destroy the C++ CronetUploadDataStream it owns on the network thread.
+ // That will result in calling the Java CronetUploadDataSteam's
+ // onCanceled() method on its executor thread, which will then destroy
+ // the CronetUploadDataStreamAdapter.
mHandler.destroyNativeObjects();
// Signal rewind completes, and wait for init to complete.

Powered by Google App Engine
This is Rietveld 408576698