#include "ui/views/widget/native_widget_aura.h"
#include <memory>
#include <set>
#include <utility>
#include "base/command_line.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/uuid.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h"
#include "ui/aura/layout_manager.h"
#include "ui/aura/window.h"
#include "ui/aura/window_observer.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/mojom/ui_base_types.mojom-shared.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animator.h"
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
#include "ui/events/test/event_generator.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/test/widget_test.h"
#include "ui/views/widget/root_view.h"
#include "ui/views/widget/unique_widget_ptr.h"
#include "ui/views/widget/widget_delegate.h"
#include "ui/wm/core/base_focus_rules.h"
#include "ui/wm/core/default_activation_client.h"
#include "ui/wm/core/focus_controller.h"
#include "ui/wm/core/transient_window_manager.h"
namespace views {
namespace {
NativeWidgetAura* Init(aura::Window* parent, Widget* widget) { … }
class TestFocusRules : public wm::BaseFocusRules { … };
class NativeWidgetAuraTest : public ViewsTestBase { … };
TEST_F(NativeWidgetAuraTest, CenterWindowLargeParent) { … }
TEST_F(NativeWidgetAuraTest, CenterWindowSmallParent) { … }
TEST_F(NativeWidgetAuraTest, CenterWindowSmallParentNotAtOrigin) { … }
class EventHandlingView : public View { … };
BEGIN_METADATA(…)
TEST_F(NativeWidgetAuraTest, MouseClickInterruptsGestureScroll) { … }
TEST_F(NativeWidgetAuraTest, CreateMinimized) { … }
TEST_F(NativeWidgetAuraTest, RestoreBounds) { … }
TEST_F(NativeWidgetAuraTest, GetWorkspace) { … }
class TestWindowObserver : public aura::WindowObserver { … };
TEST_F(NativeWidgetAuraTest, ToggleState) { … }
class TestLayoutManagerBase : public aura::LayoutManager { … };
class MaximizeLayoutManager : public TestLayoutManagerBase { … };
class TestWidget : public Widget { … };
TEST_F(NativeWidgetAuraTest, ShowMaximizedDoesntBounceAround) { … }
class PropertyTestLayoutManager : public TestLayoutManagerBase { … };
TEST_F(NativeWidgetAuraTest, TestPropertiesWhenAddedToLayout) { … }
TEST_F(NativeWidgetAuraTest, GetClientAreaScreenBounds) { … }
class GestureTrackingView : public View { … };
BEGIN_METADATA(…)
TEST_F(NativeWidgetAuraTest, DontCaptureOnGesture) { … }
TEST_F(NativeWidgetAuraTest, PreferViewLayersToChildWindows) { … }
TEST_F(NativeWidgetAuraTest,
ShouldDescendIntoChildForEventHandlingChecksVisibleBounds) { … }
TEST_F(
NativeWidgetAuraTest,
ShouldDescendIntoChildForEventHandlingIgnoresViewsThatDoNotProcessEvents) { … }
TEST_F(NativeWidgetAuraTest, FlashFrame) { … }
class MoveTestWidgetDelegate : public WidgetDelegateView { … };
TEST_F(NativeWidgetAuraTest, OnWidgetMovedInvokedAfterAcquireLayer) { … }
TEST_F(NativeWidgetAuraTest, PreventFocusOnNonActivableWindow) { … }
TEST_F(NativeWidgetAuraTest, VisibilityOfChildBubbleWindow) { … }
TEST_F(NativeWidgetAuraTest, TransientChildModalWindowVisibility) { … }
TEST_F(NativeWidgetAuraTest, MinimizedWidgetRestoreBounds) { … }
TEST_F(NativeWidgetAuraTest, WorkspaceUuid) { … }
class NativeWidgetAuraWithNoDelegateTest : public NativeWidgetAuraTest { … };
TEST_F(NativeWidgetAuraWithNoDelegateTest, GetHitTestMaskTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, GetMaximumSizeTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, GetMinimumSizeTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, GetNonClientComponentTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, GetWidgetTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, HasHitTestMaskTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, OnBoundsChangedTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, OnCaptureLostTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, OnGestureEventTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, OnKeyEventTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, OnMouseEventTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, OnPaintTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, OnResizeLoopEndedTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, OnResizeLoopStartedTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, OnScrollEventTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, OnTransientParentChangedTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, OnWindowAddedToRootWindowTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, OnWindowPropertyChangedTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, OnWindowRemovingFromRootWindowTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest,
OnWindowTargetVisibilityChangedTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, OnWindowActivatedTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, OnWindowFocusedTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, ShouldActivateTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest,
ShouldDescendIntoChildForEventHandlingTest) { … }
TEST_F(NativeWidgetAuraWithNoDelegateTest, UpdateVisualStateTest) { … }
}
}