Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3249)

Unified Diff: ash/extended_desktop_unittest.cc

Issue 17445002: Updates the display message in the uber tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test failures Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698