| Index: ui/views/widget/widget_unittest.cc
|
| diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc
|
| index 1ca9e88b8737a441cb7da5cd4fa9e88e7bfcad7c..5e0e18ed9b023e50b05a965efd54e66c4f5964b7 100644
|
| --- a/ui/views/widget/widget_unittest.cc
|
| +++ b/ui/views/widget/widget_unittest.cc
|
| @@ -3391,6 +3391,37 @@ TEST_F(WidgetTest, DestroyInSysCommandNCLButtonDownOnCaption) {
|
| widget.CloseNow();
|
| }
|
|
|
| +// On Windows if we create a fullscreen window on a thread, then it affects the
|
| +// way other windows on the thread interact with the taskbar. To workaround
|
| +// this we switch the fullscreen state of a window when it loses activation to
|
| +// a window on the same monitor. This test verifies the same.
|
| +TEST_F(WidgetTest, FullscreenStateSwitchedOnActivationLoss) {
|
| + Widget widget1;
|
| + Widget::InitParams params =
|
| + CreateParams(Widget::InitParams::TYPE_WINDOW);
|
| + params.native_widget = new PlatformDesktopNativeWidget(&widget1);
|
| + params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
|
| + widget1.Init(params);
|
| + widget1.SetBounds(gfx::Rect(0, 0, 200, 200));
|
| + widget1.Show();
|
| +
|
| + Widget widget2;
|
| + params.native_widget = new PlatformDesktopNativeWidget(&widget2);
|
| + params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
|
| + widget2.Init(params);
|
| + widget2.SetBounds(gfx::Rect(0, 0, 200, 200));
|
| + widget2.Show();
|
| +
|
| + widget1.SetFullscreen(true);
|
| + EXPECT_TRUE(widget1.IsFullscreen());
|
| +
|
| + widget2.Activate();
|
| +
|
| + EXPECT_FALSE(widget1.IsFullscreen());
|
| +
|
| + widget1.CloseNow();
|
| + widget2.CloseNow();
|
| +}
|
| #endif
|
|
|
| // Test that SetAlwaysOnTop and IsAlwaysOnTop are consistent.
|
|
|