Chromium Code Reviews| 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 65ac9b89102854f72f73f1e87ba5ae1e725bab4e..9d0f5cadea0a48436640cab0f79ed3949ddf5f69 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 |
| @@ -7,6 +7,7 @@ package org.chromium.net; |
| import android.test.suitebuilder.annotation.SmallTest; |
| import org.chromium.base.test.util.Feature; |
| +import org.chromium.net.CronetTestBase.OnlyRunNativeCronet; |
| import java.util.Arrays; |
| import java.util.List; |
| @@ -17,6 +18,7 @@ import java.util.concurrent.Executors; |
| * Tests that directly drive {@code CronetUploadDataStream} and |
| * {@code UploadDataProvider} to simulate different ordering of reset, init, |
| * read, and rewind calls. |
| + * |
|
pauljensen
2015/12/29 16:35:53
why'd you add an empty line?
Charles
2016/01/05 21:53:56
Done.
|
| */ |
| public class CronetUploadTest extends CronetTestBase { |
| private TestDrivenDataProvider mDataProvider; |
| @@ -49,8 +51,8 @@ public class CronetUploadTest extends CronetTestBase { |
| */ |
| @SmallTest |
| @Feature({"Cronet"}) |
| - public void testInitTriggersRewindAndInitBeforeRewindCompletes() |
| - throws Exception { |
| + @OnlyRunNativeCronet |
| + public void testInitTriggersRewindAndInitBeforeRewindCompletes() throws Exception { |
| // Init completes synchronously and read succeeds. |
| assertTrue(mHandler.init()); |
| mHandler.read(); |
| @@ -98,8 +100,8 @@ public class CronetUploadTest extends CronetTestBase { |
| */ |
| @SmallTest |
| @Feature({"Cronet"}) |
| - public void testInitTriggersRewindAndInitAfterRewindCompletes() |
| - throws Exception { |
| + @OnlyRunNativeCronet |
| + public void testInitTriggersRewindAndInitAfterRewindCompletes() throws Exception { |
| // Init completes synchronously and read succeeds. |
| assertTrue(mHandler.init()); |
| mHandler.read(); |
| @@ -146,6 +148,7 @@ public class CronetUploadTest extends CronetTestBase { |
| */ |
| @SmallTest |
| @Feature({"Cronet"}) |
| + @OnlyRunNativeCronet |
| public void testReadCompleteTriggerRewind() throws Exception { |
| // Reset and init before read completes. |
| assertTrue(mHandler.init()); |
| @@ -180,6 +183,7 @@ public class CronetUploadTest extends CronetTestBase { |
| */ |
| @SmallTest |
| @Feature({"Cronet"}) |
| + @OnlyRunNativeCronet |
| public void testReadCompleteTriggerRewindOnlyOneRewind() throws Exception { |
| testReadCompleteTriggerRewind(); |
| // Reset and Init again, no rewind should happen. |
| @@ -197,8 +201,8 @@ public class CronetUploadTest extends CronetTestBase { |
| */ |
| @SmallTest |
| @Feature({"Cronet"}) |
| - public void testResetBeforeReadCompleteAndInitTriggerRewind() |
| - throws Exception { |
| + @OnlyRunNativeCronet |
| + public void testResetBeforeReadCompleteAndInitTriggerRewind() throws Exception { |
| // Reset before read completes. Rewind is not triggered. |
| assertTrue(mHandler.init()); |
| mHandler.read(); |
| @@ -232,8 +236,8 @@ public class CronetUploadTest extends CronetTestBase { |
| */ |
| @SmallTest |
| @Feature({"Cronet"}) |
| - public void testDestroyNativeStreamBeforeReadComplete() |
| - throws Exception { |
| + @OnlyRunNativeCronet |
| + public void testDestroyNativeStreamBeforeReadComplete() throws Exception { |
| // Start a read and wait for it to be pending. |
| assertTrue(mHandler.init()); |
| mHandler.read(); |
| @@ -263,8 +267,8 @@ public class CronetUploadTest extends CronetTestBase { |
| */ |
| @SmallTest |
| @Feature({"Cronet"}) |
| - public void testDestroyNativeStreamBeforeRewindComplete() |
| - throws Exception { |
| + @OnlyRunNativeCronet |
| + public void testDestroyNativeStreamBeforeRewindComplete() throws Exception { |
| // Start a read and wait for it to complete. |
| assertTrue(mHandler.init()); |
| mHandler.read(); |