#include "ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h"
#include <memory>
#include <utility>
#include "base/command_line.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "build/build_config.h"
#include "ui/aura/client/capture_client.h"
#include "ui/aura/client/focus_client.h"
#include "ui/aura/test/aura_test_utils.h"
#include "ui/aura/window_tree_host.h"
#include "ui/aura/window_tree_host_observer.h"
#include "ui/base/ui_base_features.h"
#include "ui/compositor/layer.h"
#include "ui/display/display_switches.h"
#include "ui/display/types/display_constants.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/platform_window/platform_window.h"
#include "ui/views/accessible_pane_view.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
#include "ui/views/widget/widget_delegate.h"
#include "ui/views/widget/widget_observer.h"
#if BUILDFLAG(IS_OZONE)
#include "ui/ozone/public/ozone_platform.h"
#endif
#if !BUILDFLAG(IS_FUCHSIA)
#include "ui/aura/window_tree_host_platform.h"
#include "ui/platform_window/stub/stub_window.h"
#endif
namespace views {
namespace {
class TestWidgetObserver : public WidgetObserver { … };
std::unique_ptr<Widget> CreateWidgetWithNativeWidgetWithParams(
Widget::InitParams params) { … }
std::unique_ptr<Widget> CreateWidgetWithNativeWidget() { … }
}
class DesktopWindowTreeHostPlatformTest : public ViewsTestBase { … };
TEST_F(DesktopWindowTreeHostPlatformTest, CallOnNativeWidgetDestroying) { … }
TEST_F(DesktopWindowTreeHostPlatformTest, CallOnNativeWidgetVisibilityChanged) { … }
TEST_F(DesktopWindowTreeHostPlatformTest,
ToggleMinimizePropogateToContentWindow) { … }
TEST_F(DesktopWindowTreeHostPlatformTest, UpdateWindowShapeFromWindowMask) { … }
TEST_F(DesktopWindowTreeHostPlatformTest,
OnAcceleratedWidgetMadeVisibleCalled) { … }
class CustomSizeWidget : public Widget { … };
TEST_F(DesktopWindowTreeHostPlatformTest, SetBoundsWithMinMax) { … }
class ResizeObserver : public aura::WindowTreeHostObserver { … };
TEST_F(DesktopWindowTreeHostPlatformTest, SetBoundsWithUnchangedSize) { … }
TEST_F(DesktopWindowTreeHostPlatformTest, MakesParentChildRelationship) { … }
class TestWidgetDelegate : public WidgetDelegate { … };
TEST_F(DesktopWindowTreeHostPlatformTest, OnRotateFocus) { … }
TEST_F(DesktopWindowTreeHostPlatformTest, CanMaximize) { … }
TEST_F(DesktopWindowTreeHostPlatformTest, CanFullscreen) { … }
#if !BUILDFLAG(IS_FUCHSIA)
class ScopedPlatformWindowFactoryDelegate
: public aura::WindowTreeHostPlatform::
PlatformWindowFactoryDelegateForTesting { … };
TEST_F(DesktopWindowTreeHostPlatformTest, ShowInitiallyMinimizedWidget) { … }
TEST_F(DesktopWindowTreeHostPlatformTest, FocusParentWindowWillActivate) { … }
#endif
class VisibilityObserver : public aura::WindowObserver { … };
TEST_F(DesktopWindowTreeHostPlatformTest, ContentWindowShownOnce) { … }
}