• Jeroen Dhollander's avatar
    Fix VoiceInputToggle button on Assistant Embedded UI. · e45bbeeb
    Jeroen Dhollander authored
    Each |AssistantButton| is identified using an enum |AssistantButtonId|.
    These values were stored on the |AssistantButton| using views::View::SetID().
    
    Recently we also started using views::View::SetID() to make it easier to find
    views during unittests.
    This caused a conflict where the |AssistantButtonId| was overwritten.
    
    To solve this the |AssistantButton| now stores its id in a separate |id_|
    property.
    This is then passed to all interested parties using a newly introduced
    |AssistantButtonListener| API.
    
           |ash_unittests --gtest_filter="AssistantPageViewTest.*"|,
           as well as manual testing of both the embedded and standalone UI.
    
    Bug: b/144530695
    Change-Id: Id3f231553d04fb0f8a8c7c64c7762d1a8b72cd59
    Tests: Newly introduced unittests
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919830
    Commit-Queue: Jeroen Dhollander <jeroendh@google.com>
    Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#717862}
    e45bbeeb
dialog_plate.h 3.9 KB