Commit 33f61ee7 authored by Gang Wu's avatar Gang Wu Committed by Commit Bot

[Omnibox] Update icon for CLIPBOARD_TEXT from GLOBE to search MAGNIFIER

Bug: 1018888
Change-Id: Ia548a163261b25f06222916498c7b8ea83fa03d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1885211Reviewed-by: default avatarEnder <ender@google.com>
Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Commit-Queue: Gang Wu <gangwu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710896}
parent eb7da349
......@@ -128,7 +128,10 @@ public class BasicSuggestionProcessor implements SuggestionProcessor {
@VisibleForTesting
public @SuggestionIcon int getSuggestionIconType(OmniboxSuggestion suggestion) {
if (suggestion.isUrlSuggestion()) {
if (suggestion.isStarred()) {
if (suggestion.getType() == OmniboxSuggestionType.CLIPBOARD_TEXT
|| suggestion.getType() == OmniboxSuggestionType.CLIPBOARD_IMAGE) {
return SuggestionIcon.MAGNIFIER;
} else if (suggestion.isStarred()) {
return SuggestionIcon.BOOKMARK;
} else {
return SuggestionIcon.GLOBE;
......
......@@ -170,8 +170,8 @@ public class BasicSuggestionProcessorTest {
{OmniboxSuggestionType.VOICE_SUGGEST, SuggestionIcon.GLOBE},
{OmniboxSuggestionType.DOCUMENT_SUGGESTION, SuggestionIcon.GLOBE},
{OmniboxSuggestionType.PEDAL, SuggestionIcon.GLOBE},
{OmniboxSuggestionType.CLIPBOARD_TEXT, SuggestionIcon.GLOBE},
{OmniboxSuggestionType.CLIPBOARD_IMAGE, SuggestionIcon.GLOBE},
{OmniboxSuggestionType.CLIPBOARD_TEXT, SuggestionIcon.MAGNIFIER},
{OmniboxSuggestionType.CLIPBOARD_IMAGE, SuggestionIcon.MAGNIFIER},
};
for (int[] test : testSuites) {
......@@ -201,8 +201,8 @@ public class BasicSuggestionProcessorTest {
{OmniboxSuggestionType.VOICE_SUGGEST, SuggestionIcon.BOOKMARK},
{OmniboxSuggestionType.DOCUMENT_SUGGESTION, SuggestionIcon.BOOKMARK},
{OmniboxSuggestionType.PEDAL, SuggestionIcon.BOOKMARK},
{OmniboxSuggestionType.CLIPBOARD_TEXT, SuggestionIcon.BOOKMARK},
{OmniboxSuggestionType.CLIPBOARD_IMAGE, SuggestionIcon.BOOKMARK},
{OmniboxSuggestionType.CLIPBOARD_TEXT, SuggestionIcon.MAGNIFIER},
{OmniboxSuggestionType.CLIPBOARD_IMAGE, SuggestionIcon.MAGNIFIER},
};
for (int[] test : testSuites) {
......
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