// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" #include "ui/views/test/native_widget_factory.h" #include "ui/views/test/widget_activation_waiter.h" #include "ui/views/test/widget_test.h" #include "ui/wm/public/activation_client.h" namespace views::test { DesktopNativeWidgetAuraTest; // This tests ensures that when a widget with an active child widget are // showing, and a new widget is shown, the widget and its child are both // deactivated. This covers a regression where deactivating the child widget // would activate the parent widget at the same time the new widget receives // activation, causing windows to lock when minimizing / maximizing (see // crbug.com/1284537). TEST_F(DesktopNativeWidgetAuraTest, WidgetsWithChildrenDeactivateCorrectly) { … } // Tests to make sure that a widget that shows an active child has activation // correctly propagate to the child's content window. This also tests to make // sure that when this child window is closed, and the desktop widget's window // tree host remains active, the widget's content window has its activation // state restored. This tests against a regression where the desktop widget // would not receive activation when it's child bubbles were closed (see // crbug.com/1294404). TEST_F(DesktopNativeWidgetAuraTest, DesktopWidgetsRegainFocusWhenChildWidgetClosed) { … } } // namespace views::test