Commit 923f750a authored by Katie D's avatar Katie D Committed by Commit Bot

Clean-up: Adds trivial test for empty override functions.

This increases code coverage by 100% for select_to_speak_tray.h.

Bug: 1067399
Change-Id: I59c8caa322aae3189d04da0afe8520cdfb2ab457
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134862Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Commit-Queue: Katie Dektar <katie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756273}
parent 5df5d2b1
...@@ -29,9 +29,11 @@ class ASH_EXPORT SelectToSpeakTray : public TrayBackgroundView, ...@@ -29,9 +29,11 @@ class ASH_EXPORT SelectToSpeakTray : public TrayBackgroundView,
// TrayBackgroundView: // TrayBackgroundView:
base::string16 GetAccessibleNameForTray() override; base::string16 GetAccessibleNameForTray() override;
const char* GetClassName() const override; const char* GetClassName() const override;
bool PerformAction(const ui::Event& event) override;
// The SelectToSpeakTray does not have a bubble, so these functions are
// no-ops.
void HideBubbleWithView(const TrayBubbleView* bubble_view) override {} void HideBubbleWithView(const TrayBubbleView* bubble_view) override {}
void ClickedOutsideBubble() override {} void ClickedOutsideBubble() override {}
bool PerformAction(const ui::Event& event) override;
// AccessibilityObserver: // AccessibilityObserver:
void OnAccessibilityStatusChanged() override; void OnAccessibilityStatusChanged() override;
......
...@@ -118,4 +118,12 @@ TEST_F(SelectToSpeakTrayTest, SelectToSpeakStateImpactsImageAndActivation) { ...@@ -118,4 +118,12 @@ TEST_F(SelectToSpeakTrayTest, SelectToSpeakStateImpactsImageAndActivation) {
GetInactiveImage().BackedBySameObjectAs(GetImageView()->GetImage())); GetInactiveImage().BackedBySameObjectAs(GetImageView()->GetImage()));
} }
// Trivial test to increase coverage of select_to_speak_tray.h. The
// SelectToSpeakTray does not have a bubble, so these are empty functions.
// Without this test, coverage of select_to_speak_tray.h is 0%.
TEST_F(SelectToSpeakTrayTest, OverriddenFunctionsDoNothing) {
GetTray()->HideBubbleWithView(nullptr);
GetTray()->ClickedOutsideBubble();
}
} // namespace ash } // namespace ash
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