Chromium Code Reviews| Index: ash/system/web_notification/web_notification_tray_unittest.cc |
| diff --git a/ash/system/web_notification/web_notification_tray_unittest.cc b/ash/system/web_notification/web_notification_tray_unittest.cc |
| index f45218a49f84cbd6a5f8911d17466641d174b5b6..8f53a8392e0627def29d83a4b6d4c1ab7404d29a 100644 |
| --- a/ash/system/web_notification/web_notification_tray_unittest.cc |
| +++ b/ash/system/web_notification/web_notification_tray_unittest.cc |
| @@ -7,6 +7,7 @@ |
| #include <utility> |
| #include <vector> |
| +#include "ash/common/shelf/shelf_layout_manager.h" |
| #include "ash/common/shelf/wm_shelf.h" |
| #include "ash/common/shell_window_ids.h" |
| #include "ash/common/system/status_area_widget.h" |
| @@ -147,6 +148,10 @@ class WebNotificationTrayTest : public test::AshTestBase { |
| nullptr, kShellWindowId_DefaultContainer, gfx::Rect(1, 2, 3, 4)); |
| } |
| + static void UpdateAutoHideStateNow() { |
| + GetPrimaryShelf()->shelf_layout_manager()->UpdateAutoHideStateNow(); |
| + } |
| + |
| private: |
| DISALLOW_COPY_AND_ASSIGN(WebNotificationTrayTest); |
| }; |
| @@ -370,6 +375,7 @@ TEST_F(WebNotificationTrayTest, MAYBE_PopupAndAutoHideShelf) { |
| TestItem* test_item = new TestItem; |
| GetSystemTray()->AddTrayItem(test_item); |
| GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW); |
| + UpdateAutoHideStateNow(); |
|
James Cook
2016/09/22 21:17:17
Would it work to call shelf->UpdateAutoHideState()
oshima
2016/09/23 09:37:20
This is to deal with timer delay, not posted event
|
| EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->GetAutoHideState()); |
| EXPECT_TRUE(GetTray()->IsPopupVisible()); |