Index: ash/extended_desktop_unittest.cc |
diff --git a/ash/extended_desktop_unittest.cc b/ash/extended_desktop_unittest.cc |
index f71a0b5f751e0be82f92d86354ab24cbc1ed7230..44d441bc9bed2e948eaed7aa5ed9d4de5efcc037 100644 |
--- a/ash/extended_desktop_unittest.cc |
+++ b/ash/extended_desktop_unittest.cc |
@@ -4,6 +4,7 @@ |
#include "ash/display/display_controller.h" |
#include "ash/display/display_manager.h" |
+#include "ash/root_window_controller.h" |
#include "ash/screen_ash.h" |
#include "ash/shell.h" |
#include "ash/shell_window_ids.h" |
@@ -807,6 +808,14 @@ TEST_F(ExtendedDesktopTest, PassiveGrab) { |
ash::Shell::GetInstance()->AddPreTargetHandler(&event_handler); |
UpdateDisplay("300x300,200x200"); |
+ // close all notification for display change. Otherwise some event may |
+ // happen on the notification bubble, which breaks the test expectation. |
+ // TODO(mukai): remove this when the display change notification has moved |
+ // to the message_center. |
+ Shell::RootWindowControllerList root_controllers = |
+ Shell::GetAllRootWindowControllers(); |
+ for (size_t i = 0; i < root_controllers.size(); ++i) |
+ root_controllers[i]->GetSystemTray()->CloseNotificationBubbleForTest(); |
views::Widget* widget = CreateTestWidget(gfx::Rect(50, 50, 200, 200)); |
widget->Show(); |