| Index: content/public/android/javatests/src/org/chromium/content/browser/TransitionTest.java
|
| diff --git a/content/public/android/javatests/src/org/chromium/content/browser/TransitionTest.java b/content/public/android/javatests/src/org/chromium/content/browser/TransitionTest.java
|
| index 88a7c614b68f7a8ac03a777bbfa66d25fe8efd3b..9d0c6881bf182042d94d626587433fb1d16f55bc 100644
|
| --- a/content/public/android/javatests/src/org/chromium/content/browser/TransitionTest.java
|
| +++ b/content/public/android/javatests/src/org/chromium/content/browser/TransitionTest.java
|
| @@ -126,7 +126,7 @@ public class TransitionTest extends ContentShellTestBase {
|
|
|
| /**
|
| * Tests that the listener does not receive DidDeferAfterResponseStarted if we specify that
|
| - * the transition is handled.
|
| + * the transition is not handled.
|
| */
|
| @SmallTest
|
| public void testDidDeferAfterResponseStartedNotCalled() throws Throwable {
|
| @@ -149,6 +149,32 @@ public class TransitionTest extends ContentShellTestBase {
|
| }
|
|
|
| /**
|
| + * Tests clearNavigationTransitionData(). The listener does not receive
|
| + * DidDeferAfterResponseStarted even if we specify that the transition is handled
|
| + * because the data is cleared before the navigation.
|
| + */
|
| + @SmallTest
|
| + public void testDidDeferAfterResponseStartedNotCalledWithoutData() throws Throwable {
|
| + ContentShellActivity activity = launchContentShellWithUrl(URL_1);
|
| + waitForActiveShellToBeDoneLoading();
|
| + ContentViewCore contentViewCore = activity.getActiveContentViewCore();
|
| + TestCallbackHelperContainer testCallbackHelperContainer =
|
| + new TestCallbackHelperContainer(contentViewCore);
|
| +
|
| + contentViewCore.getWebContents().setHasPendingNavigationTransitionForTesting();
|
| + TestNavigationTransitionDelegate delegate = new TestNavigationTransitionDelegate(
|
| + contentViewCore.getWebContents(),
|
| + true);
|
| + contentViewCore.getWebContents().setNavigationTransitionDelegate(delegate);
|
| +
|
| + contentViewCore.getWebContents().clearNavigationTransitionData();
|
| + loadUrl(contentViewCore.getWebContents().getNavigationController(),
|
| + testCallbackHelperContainer, new LoadUrlParams(URL_1));
|
| +
|
| + assertFalse("didDeferAfterResponseStarted called.", delegate.getDidCallDefer());
|
| + }
|
| +
|
| + /**
|
| * Tests that the resource handler doesn't query the listener if no transition is pending.
|
| */
|
| @SmallTest
|
|
|