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

Unified Diff: ash/wm/overview/window_selector_unittest.cc

Issue 327873005: Fixed panel callout widgets showing up in the overview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed last nits. Created 6 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
« no previous file with comments | « ash/wm/overview/window_selector_panels.cc ('k') | ash/wm/panels/panel_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/overview/window_selector_unittest.cc
diff --git a/ash/wm/overview/window_selector_unittest.cc b/ash/wm/overview/window_selector_unittest.cc
index 57b220a0feb38d2c33815c083227c7cc9f49ea88..01c486f14cab3bcd97e6394dd54ed9ca98d249f3 100644
--- a/ash/wm/overview/window_selector_unittest.cc
+++ b/ash/wm/overview/window_selector_unittest.cc
@@ -20,6 +20,7 @@
#include "ash/wm/overview/window_selector.h"
#include "ash/wm/overview/window_selector_controller.h"
#include "ash/wm/overview/window_selector_item.h"
+#include "ash/wm/panels/panel_layout_manager.h"
#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
#include "ash/wm/wm_event.h"
@@ -887,4 +888,32 @@ TEST_F(WindowSelectorTest, SelectWindowWithReturnKey) {
EXPECT_TRUE(wm::IsActiveWindow(window2.get()));
}
+// Tests that overview mode hides the callout widget.
+TEST_F(WindowSelectorTest, WindowOverviewHidesCalloutWidgets) {
+ scoped_ptr<aura::Window> panel1(CreatePanelWindow(gfx::Rect(0, 0, 100, 100)));
+ scoped_ptr<aura::Window> panel2(CreatePanelWindow(gfx::Rect(0, 0, 100, 100)));
+ PanelLayoutManager* panel_manager =
+ static_cast<PanelLayoutManager*>(panel1->parent()->layout_manager());
+
+ // By default, panel callout widgets are visible.
+ EXPECT_TRUE(
+ panel_manager->GetCalloutWidgetForPanel(panel1.get())->IsVisible());
+ EXPECT_TRUE(
+ panel_manager->GetCalloutWidgetForPanel(panel2.get())->IsVisible());
+
+ // Toggling the overview should hide the callout widgets.
+ ToggleOverview();
+ EXPECT_FALSE(
+ panel_manager->GetCalloutWidgetForPanel(panel1.get())->IsVisible());
+ EXPECT_FALSE(
+ panel_manager->GetCalloutWidgetForPanel(panel2.get())->IsVisible());
+
+ // Ending the overview should show them again.
+ ToggleOverview();
+ EXPECT_TRUE(
+ panel_manager->GetCalloutWidgetForPanel(panel1.get())->IsVisible());
+ EXPECT_TRUE(
+ panel_manager->GetCalloutWidgetForPanel(panel2.get())->IsVisible());
+}
+
} // namespace ash
« no previous file with comments | « ash/wm/overview/window_selector_panels.cc ('k') | ash/wm/panels/panel_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698