Commit e719fca9 authored by Mugdha Lakhani's avatar Mugdha Lakhani Committed by Commit Bot

[WebLayer] Let the embedder know if navigation entry will be replaced.

Bug: 1119726
Change-Id: If3a82e7718590e51bafeee191e2176cd2a3f2a4b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2366754
Commit-Queue: Mugdha Lakhani <nator@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarBo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800527}
parent 9e3a51f1
...@@ -316,6 +316,9 @@ public class NavigationTest { ...@@ -316,6 +316,9 @@ public class NavigationTest {
assertEquals(1, navigationController.getNavigationListSize()); assertEquals(1, navigationController.getNavigationListSize());
}); });
// Verify getter works as expected.
assertTrue(params.getShouldReplaceCurrentEntry());
// Verify that a default NavigateParams does not replace. // Verify that a default NavigateParams does not replace.
final NavigateParams params2 = new NavigateParams(); final NavigateParams params2 = new NavigateParams();
navigateAndWaitForCompletion(URL3, navigateAndWaitForCompletion(URL3,
......
...@@ -50,4 +50,13 @@ public class NavigateParams { ...@@ -50,4 +50,13 @@ public class NavigateParams {
org.chromium.weblayer_private.interfaces.NavigateParams toInterfaceParams() { org.chromium.weblayer_private.interfaces.NavigateParams toInterfaceParams() {
return mInterfaceParams; return mInterfaceParams;
} }
/**
* Returns true if the current navigation will be replaced, false otherwise.
*
* @since 83
*/
public boolean getShouldReplaceCurrentEntry() {
return mInterfaceParams.mShouldReplaceCurrentEntry;
}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment