chromium/ui/views/widget/desktop_aura/desktop_window_tree_host_platform_unittest.cc

// Copyright 2018 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_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"    // nogncheck
#include "ui/platform_window/stub/stub_window.h"  // nogncheck
#endif

namespace views {

namespace {

class TestWidgetObserver : public WidgetObserver {};

std::unique_ptr<Widget> CreateWidgetWithNativeWidgetWithParams(
    Widget::InitParams params) {}

std::unique_ptr<Widget> CreateWidgetWithNativeWidget() {}

}  // namespace

class DesktopWindowTreeHostPlatformTest : public ViewsTestBase {};

TEST_F(DesktopWindowTreeHostPlatformTest, CallOnNativeWidgetDestroying) {}

// Calling show/hide/show triggers changing visibility of the native widget.
TEST_F(DesktopWindowTreeHostPlatformTest, CallOnNativeWidgetVisibilityChanged) {}

// Tests that the minimization information is propagated to the content window.
TEST_F(DesktopWindowTreeHostPlatformTest,
       ToggleMinimizePropogateToContentWindow) {}

// Tests that the window shape is updated from the
// |NonClientView::GetWindowMask|.
TEST_F(DesktopWindowTreeHostPlatformTest, UpdateWindowShapeFromWindowMask) {}

// Calling show/hide/show triggers changing visibility of the native widget.
TEST_F(DesktopWindowTreeHostPlatformTest,
       OnAcceleratedWidgetMadeVisibleCalled) {}

// A Widget that allows setting the min/max size for the widget.
class CustomSizeWidget : public Widget {};

TEST_F(DesktopWindowTreeHostPlatformTest, SetBoundsWithMinMax) {}

class ResizeObserver : public aura::WindowTreeHostObserver {};

// Verifies that setting widget bounds, just after creating it, with the same
// size passed in InitParams does not lead to a "bounds change" event. Prevents
// regressions, such as https://crbug.com/1151092.
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  // !BUILDFLAG(IS_FUCHSIA)

class VisibilityObserver : public aura::WindowObserver {};

TEST_F(DesktopWindowTreeHostPlatformTest, ContentWindowShownOnce) {}

}  // namespace views