Chromium Code Reviews| Index: ash/tooltips/tooltip_controller_unittest.cc |
| diff --git a/ash/tooltips/tooltip_controller_unittest.cc b/ash/tooltips/tooltip_controller_unittest.cc |
| index ff35ba24b0889220229255c229825514f0a28c7d..74c70a6386550ddc292667efb4b794eebaf15c22 100644 |
| --- a/ash/tooltips/tooltip_controller_unittest.cc |
| +++ b/ash/tooltips/tooltip_controller_unittest.cc |
| @@ -110,19 +110,19 @@ TEST_F(TooltipControllerTest, HideTooltipWhenCursorHidden) { |
| base::string16 expected_tooltip = base::ASCIIToUTF16("Tooltip Text"); |
| // Fire tooltip timer so tooltip becomes visible. |
|
brucedawson
2017/01/06 20:45:23
Comment is no longer accurate.
chengx
2017/01/06 20:58:19
Sure, I will update in the next patch.
chengx
2017/01/06 23:08:31
Comment updated.
|
| - helper_->FireTooltipTimer(); |
| + helper_->UpdateIfRequired(); |
| EXPECT_TRUE(helper_->IsTooltipVisible()); |
| // Hide the cursor and check again. |
| ash::Shell::GetInstance()->cursor_manager()->DisableMouseEvents(); |
| - helper_->FireTooltipTimer(); |
| + helper_->UpdateIfRequired(); |
| EXPECT_FALSE(helper_->IsTooltipVisible()); |
| // Show the cursor and re-check. |
| RunAllPendingInMessageLoop(); |
| ash::Shell::GetInstance()->cursor_manager()->EnableMouseEvents(); |
| RunAllPendingInMessageLoop(); |
| - helper_->FireTooltipTimer(); |
| + helper_->UpdateIfRequired(); |
| EXPECT_TRUE(helper_->IsTooltipVisible()); |
| } |
| @@ -150,7 +150,7 @@ TEST_F(TooltipControllerTest, TooltipsOnMultiDisplayShouldNotCrash) { |
| ui::test::EventGenerator generator(root_windows[1]); |
| generator.MoveMouseRelativeTo(widget2->GetNativeView(), |
| view2->bounds().CenterPoint()); |
| - helper_->FireTooltipTimer(); |
| + helper_->UpdateIfRequired(); |
| EXPECT_TRUE(helper_->IsTooltipVisible()); |
| // Get rid of secondary display. This destroy's the tooltip's aura window. If |
| @@ -169,7 +169,7 @@ TEST_F(TooltipControllerTest, TooltipsOnMultiDisplayShouldNotCrash) { |
| ui::test::EventGenerator generator1(root_windows[0]); |
| generator1.MoveMouseRelativeTo(widget1->GetNativeView(), |
| view1->bounds().CenterPoint()); |
| - helper_->FireTooltipTimer(); |
| + helper_->UpdateIfRequired(); |
| EXPECT_TRUE(helper_->IsTooltipVisible()); |
| } |