| Index: ash/system/tray/system_tray_unittest.cc
|
| diff --git a/ash/system/tray/system_tray_unittest.cc b/ash/system/tray/system_tray_unittest.cc
|
| index 27694a3dac90070857a3be8d15bff5a9474554ea..f1590259e38a62d9b02bd29c9afe3d877404a84b 100644
|
| --- a/ash/system/tray/system_tray_unittest.cc
|
| +++ b/ash/system/tray/system_tray_unittest.cc
|
| @@ -16,6 +16,7 @@
|
| #include "ash/system/tray/system_tray_item.h"
|
| #include "ash/system/tray/tray_constants.h"
|
| #include "ash/system/tray/tray_popup_item_container.h"
|
| +#include "ash/system/web_notification/web_notification_tray.h"
|
| #include "ash/test/ash_test_base.h"
|
| #include "ash/wm/window_util.h"
|
| #include "base/run_loop.h"
|
| @@ -552,6 +553,29 @@ TEST_F(SystemTrayTest, TrayPopupItemContainerTouchFeedbackCancellation) {
|
| generator.ReleaseTouch();
|
| EXPECT_FALSE(view->active());
|
| }
|
| +
|
| +TEST_F(SystemTrayTest, SystemTrayHeightWithBubble) {
|
| + StatusAreaWidget* widget = Shell::GetPrimaryRootWindowController()
|
| + ->shelf_widget()
|
| + ->status_area_widget();
|
| + SystemTray* tray = widget->system_tray();
|
| + WebNotificationTray* notification_tray =
|
| + tray->status_area_widget()->web_notification_tray();
|
| +
|
| + // Ensure the initial system tray height is zero.
|
| + EXPECT_EQ(0, notification_tray->system_tray_height_for_test());
|
| +
|
| + // Show the default view, ensure the system tray height is changed.
|
| + tray->ShowDefaultView(BUBBLE_CREATE_NEW);
|
| + RunAllPendingInMessageLoop();
|
| + EXPECT_LT(0, notification_tray->system_tray_height_for_test());
|
| +
|
| + // Hide the default view, ensure the system tray height is back to zero.
|
| + ASSERT_TRUE(tray->CloseSystemBubble());
|
| + RunAllPendingInMessageLoop();
|
| +
|
| + EXPECT_EQ(0, notification_tray->system_tray_height_for_test());
|
| +}
|
| #endif // OS_CHROMEOS
|
|
|
| } // namespace test
|
|
|