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

Unified Diff: ui/views/widget/widget_unittest.cc

Issue 13849012: We need to call aura::Window::Show from the DesktopNativeWidgetAura::ShowMaximizedWithBounds and Sh… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 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 | « ui/views/widget/desktop_aura/desktop_native_widget_aura.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget_unittest.cc
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc
index e4376caec0fa2cfa39bc9acbb4af12293133ae38..de7fd52051f16811a4498580d7c7e72ab343e77a 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -1444,6 +1444,29 @@ TEST_F(WidgetTest, DesktopAuraFullscreenChildParentDestroyed) {
RunPendingMessages();
}
+// Test to ensure that the aura Window's visiblity state is set to visible if
+// the underlying widget is hidden and then shown.
+TEST_F(WidgetTest, TestWindowVisibilityAfterHide) {
+ // Create a widget.
+ Widget widget;
+ Widget::InitParams init_params =
+ CreateParams(Widget::InitParams::TYPE_WINDOW);
+ init_params.show_state = ui::SHOW_STATE_NORMAL;
+ gfx::Rect initial_bounds(0, 0, 300, 400);
+ init_params.bounds = initial_bounds;
+ init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
+ init_params.native_widget = new DesktopNativeWidgetAura(&widget);
+ widget.Init(init_params);
+ NonClientView* non_client_view = widget.non_client_view();
+ NonClientFrameView* frame_view = new MinimumSizeFrameView(&widget);
+ non_client_view->SetFrameView(frame_view);
+
+ widget.Hide();
+ EXPECT_FALSE(widget.GetNativeView()->IsVisible());
+ widget.Show();
+ EXPECT_TRUE(widget.GetNativeView()->IsVisible());
+}
+
#endif // !defined(OS_CHROMEOS)
// Tests that wheel events generted from scroll events are targetted to the
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698