Commit a161ee46 authored by Shakti Sahu's avatar Shakti Sahu Committed by Chromium LUCI CQ

Read Later : Dont show app menu IPH for three button action bar

Bug: 1159557
Change-Id: I0c2e5d759b17620dcb1333002e80943da253e8c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2595889
Commit-Queue: Shakti Sahu <shaktisahu@chromium.org>
Reviewed-by: default avatarXing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#838615}
parent ea3f1292
...@@ -44,6 +44,10 @@ public class ReadLaterIPHController { ...@@ -44,6 +44,10 @@ public class ReadLaterIPHController {
*/ */
public void onCopyContextMenuItemClicked() { public void onCopyContextMenuItemClicked() {
if (!ChromeFeatureList.isEnabled(ChromeFeatureList.READ_LATER)) return; if (!ChromeFeatureList.isEnabled(ChromeFeatureList.READ_LATER)) return;
if (ChromeFeatureList.isEnabled(
ChromeFeatureList.TABBED_APP_OVERFLOW_MENU_THREE_BUTTON_ACTIONBAR)) {
return;
}
mUserEducationHelper.requestShowIPH( mUserEducationHelper.requestShowIPH(
new IPHCommandBuilder(mToolbarMenuButton.getContext().getResources(), new IPHCommandBuilder(mToolbarMenuButton.getContext().getResources(),
FeatureConstants.READ_LATER_APP_MENU_BOOKMARK_THIS_PAGE_FEATURE, FeatureConstants.READ_LATER_APP_MENU_BOOKMARK_THIS_PAGE_FEATURE,
...@@ -65,6 +69,10 @@ public class ReadLaterIPHController { ...@@ -65,6 +69,10 @@ public class ReadLaterIPHController {
private void showReadLaterAppMenuBookmarksIPH() { private void showReadLaterAppMenuBookmarksIPH() {
if (!ChromeFeatureList.isEnabled(ChromeFeatureList.READ_LATER)) return; if (!ChromeFeatureList.isEnabled(ChromeFeatureList.READ_LATER)) return;
if (ChromeFeatureList.isEnabled(
ChromeFeatureList.TABBED_APP_OVERFLOW_MENU_THREE_BUTTON_ACTIONBAR)) {
return;
}
mUserEducationHelper.requestShowIPH( mUserEducationHelper.requestShowIPH(
new IPHCommandBuilder(mToolbarMenuButton.getContext().getResources(), new IPHCommandBuilder(mToolbarMenuButton.getContext().getResources(),
FeatureConstants.READ_LATER_APP_MENU_BOOKMARKS_FEATURE, FeatureConstants.READ_LATER_APP_MENU_BOOKMARKS_FEATURE,
......
...@@ -111,8 +111,13 @@ public class ReadLaterIphTest { ...@@ -111,8 +111,13 @@ public class ReadLaterIphTest {
RevampedContextMenuUtils.selectContextMenuItem(InstrumentationRegistry.getInstrumentation(), RevampedContextMenuUtils.selectContextMenuItem(InstrumentationRegistry.getInstrumentation(),
activity, tab, CONTEXT_MENU_LINK_DOM_ID, R.id.contextmenu_copy_link_address); activity, tab, CONTEXT_MENU_LINK_DOM_ID, R.id.contextmenu_copy_link_address);
onView(withId(R.id.menu_button_wrapper)).check(matches(withHighlight(true))); boolean threeButtonActionBarEnabled = ChromeFeatureList.isEnabled(
waitForHelpBubble(withText(R.string.reading_list_save_pages_for_later)); ChromeFeatureList.TABBED_APP_OVERFLOW_MENU_THREE_BUTTON_ACTIONBAR);
onView(withId(R.id.menu_button_wrapper))
.check(matches(withHighlight(!threeButtonActionBarEnabled)));
if (!threeButtonActionBarEnabled) {
waitForHelpBubble(withText(R.string.reading_list_save_pages_for_later));
}
} }
@Test @Test
......
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