Chromium Code Reviews| Index: components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestTest.java |
| diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestTest.java b/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestTest.java |
| index afe7a3c39282c9db13a40e8db822fd4c448ef76f..b5d30b03d3fc32043a7bf3e2787c386b445ab031 100644 |
| --- a/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestTest.java |
| +++ b/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestTest.java |
| @@ -1679,10 +1679,12 @@ public class CronetUrlRequestTest extends CronetTestBase { |
| assertEquals(expectResponseInfo, callback.mResponseInfo != null); |
| assertEquals(expectError, callback.mError != null); |
| assertEquals(expectError, callback.mOnErrorCalled); |
| - assertEquals(failureType == FailureType.CANCEL_SYNC |
| - || failureType == FailureType.CANCEL_ASYNC |
| - || failureType == FailureType.CANCEL_ASYNC_WITHOUT_PAUSE, |
| + assertEquals( |
| + failureType == FailureType.CANCEL_SYNC || failureType == FailureType.CANCEL_ASYNC, |
| callback.mOnCanceledCalled); |
| + // When failureType is FailureType.CANCEL_ASYNC_WITHOUT_PAUSE, there |
| + // might be an onSucceeded() task already posted. If that's the case, |
| + // onCanceled() will not be invoked. See crbug.com/657415. |
|
pauljensen
2016/12/14 14:40:31
I'm confused, we waited for the callback to get ei
pauljensen
2016/12/14 15:17:32
I was confused because mResponseInfo is set in onR
xunjieli
2016/12/14 15:35:39
After talking to you, I realize that we should onl
|
| } |
| @SmallTest |