#include "ui/aura/window.h"
#include <limits.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/compiler_specific.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/test/bind.h"
#include "build/build_config.h"
#include "cc/trees/layer_tree_frame_sink.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/aura/client/capture_client.h"
#include "ui/aura/client/focus_change_observer.h"
#include "ui/aura/client/visibility_client.h"
#include "ui/aura/client/window_parenting_client.h"
#include "ui/aura/layout_manager.h"
#include "ui/aura/scoped_window_capture_request.h"
#include "ui/aura/scoped_window_event_targeting_blocker.h"
#include "ui/aura/test/aura_test_base.h"
#include "ui/aura/test/aura_test_utils.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/test/test_windows.h"
#include "ui/aura/test/window_test_api.h"
#include "ui/aura/window_delegate.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/aura/window_observer.h"
#include "ui/aura/window_tracker.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/class_property.h"
#include "ui/base/hit_test.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/compositor_observer.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animation_observer.h"
#include "ui/compositor/layer_animator.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/compositor/test/layer_animator_test_controller.h"
#include "ui/compositor/test/test_layers.h"
#include "ui/display/screen.h"
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
#include "ui/events/gesture_detection/gesture_configuration.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/events/test/event_generator.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/skia_conversions.h"
#include "ui/gfx/geometry/vector2d.h"
#include "ui/gfx/overlay_transform_utils.h"
DEFINE_UI_CLASS_PROPERTY_TYPE(…)
namespace {
enum class DeletionOrder { … };
class DeletionTracker { … };
class LayerTranslationAnimationNotifier : public ui::CompositorObserver { … };
class DeletionTestProperty { … };
DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(…)
}
DEFINE_UI_CLASS_PROPERTY_TYPE(…)
namespace aura {
namespace test {
namespace {
class WindowTest : public AuraTestBase { … };
class DestroyTrackingDelegateImpl : public TestWindowDelegate { … };
class ChildWindowDelegateImpl : public DestroyTrackingDelegateImpl { … };
class DestroyOrphanDelegate : public TestWindowDelegate { … };
class CaptureWindowDelegateImpl : public TestWindowDelegate { … };
class GestureTrackPositionDelegate : public TestWindowDelegate { … };
base::TimeTicks getTime() { … }
class SelfEventHandlingWindowDelegate : public TestWindowDelegate { … };
class DestroyWindowDelegate : public TestWindowDelegate { … };
void OffsetBounds(Window* window, int horizontal, int vertical) { … }
TEST_F(WindowTest, GetChildById) { … }
TEST_F(WindowTest, Contains) { … }
TEST_F(WindowTest, ContainsPointInRoot) { … }
TEST_F(WindowTest, ContainsPoint) { … }
TEST_F(WindowTest, MakeWindowCapturable) { … }
TEST_F(WindowTest, DeletingCapturableWindows) { … }
TEST_F(WindowTest, LayerReleasingAndSettingOfCapturableWindow) { … }
TEST_F(WindowTest, RecreateLayerOfCapturableWindow) { … }
TEST_F(WindowTest, ConvertPointToWindow) { … }
TEST_F(WindowTest, MoveCursorTo) { … }
TEST_F(WindowTest, ContainsMouse) { … }
TEST_F(WindowTest, RootWindowHasValidLocalSurfaceId) { … }
TEST_F(WindowTest, WindowEmbeddingClientHasValidLocalSurfaceId) { … }
TEST_F(WindowTest, MoveCursorToWithTransformRootWindow) { … }
TEST_F(WindowTest, MoveCursorToWithTransformWindow) { … }
TEST_F(WindowTest, MoveCursorToWithComplexTransform) { … }
TEST_F(WindowTest, NoCrashOnWindowDelete) { … }
TEST_F(WindowTest, GetEventHandlerForPoint) { … }
TEST_F(WindowTest, GetEventHandlerForPointInCornerOfChildBounds) { … }
TEST_F(WindowTest, GetEventHandlerForPointWithOverrideDescendingOrder) { … }
TEST_F(WindowTest, GetToplevelWindow) { … }
class AddedToRootWindowObserver : public WindowObserver { … };
TEST_F(WindowTest, WindowAddedToRootWindowShouldNotifyChildAndNotParent) { … }
TEST_F(WindowTest, DestroyTest) { … }
TEST_F(WindowTest, OrphanedBeforeOnDestroyed) { … }
TEST_F(WindowTest, StackChildAtTop) { … }
TEST_F(WindowTest, StackChildBelow) { … }
TEST_F(WindowTest, StackChildAbove) { … }
TEST_F(WindowTest, CaptureTests) { … }
TEST_F(WindowTest, TouchCaptureCancelsOtherTouches) { … }
TEST_F(WindowTest, TouchCaptureDoesntCancelCapturedTouches) { … }
TEST_F(WindowTest, TransferCaptureTouchEvents) { … }
TEST_F(WindowTest, ChangeCaptureWhileMouseDown) { … }
TEST_F(WindowTest, ReleaseCaptureOnDestroy) { … }
TEST_F(WindowTest, GetBoundsInRootWindow) { … }
TEST_F(WindowTest, GetBoundsInRootWindowWithLayers) { … }
TEST_F(WindowTest, GetBoundsInRootWindowWithLayersAndTranslations) { … }
class MouseEnterExitWindowDelegate : public TestWindowDelegate { … };
TEST_F(WindowTest, MouseEnterExit) { … }
TEST_F(WindowTest, WindowTreeHostExit) { … }
TEST_F(WindowTest, MouseEnterExitWithClick) { … }
TEST_F(WindowTest, MouseEnterExitWhenDeleteWithCapture) { … }
TEST_F(WindowTest, MouseEnterExitWithWindowAppearAndDelete) { … }
TEST_F(WindowTest, MouseEnterExitWithHide) { … }
TEST_F(WindowTest, MouseEnterExitWithParentHide) { … }
TEST_F(WindowTest, MouseEnterExitWithParentDelete) { … }
TEST_F(WindowTest, GetEventHandlerForPoint_NoDelegate) { … }
class VisibilityWindowDelegate : public TestWindowDelegate { … };
TEST_F(WindowTest, Visibility) { … }
TEST_F(WindowTest, EventTargetingPolicy) { … }
TEST_F(WindowTest, ScopedEventTargetingBlockerTest) { … }
TEST_F(WindowTest, Transform) { … }
TEST_F(WindowTest, TransformGesture) { … }
TEST_F(WindowTest, Property) { … }
class DeletionTestLayoutManager : public LayoutManager { … };
TEST_F(WindowTest, DeleteLayoutManagerBeforeOwnedProps) { … }
TEST_F(WindowTest, SetBoundsInternalShouldCheckTargetBounds) { … }
PropertyChangeInfo;
class WindowObserverTest : public WindowTest,
public WindowObserver { … };
TEST_F(WindowObserverTest, WindowObserver) { … }
TEST_F(WindowObserverTest, WindowVisibility) { … }
TEST_F(WindowObserverTest, WindowDestroyed) { … }
TEST_F(WindowObserverTest, PropertyChanged) { … }
TEST_F(WindowObserverTest, WindowBoundsChanged) { … }
TEST_F(WindowObserverTest, WindowBoundsChangedAnimation) { … }
TEST_F(WindowObserverTest, WindowOpacityChanged) { … }
TEST_F(WindowObserverTest, WindowOpacityChangedAnimation) { … }
TEST_F(WindowObserverTest, WindowAlphaShapeChanged) { … }
TEST_F(WindowObserverTest, SetTransform) { … }
TEST_F(WindowObserverTest, SetTransformAnimation) { … }
TEST_F(WindowObserverTest, OnWindowLayerRecreated) { … }
TEST_F(WindowObserverTest, OnWindowLayerRecreatedWithOpacityAnimation) { … }
TEST_F(WindowObserverTest, OnWindowLayerRecreatedWithTransformAnimation) { … }
TEST_F(WindowTest, AcquireLayer) { … }
TEST_F(WindowTest, RecreateLayer) { … }
TEST_F(WindowTest, RecreateLayerZOrder) { … }
TEST_F(WindowTest, AcquireThenRecreateLayer) { … }
class TestVisibilityClient : public client::VisibilityClient { … };
TEST_F(WindowTest, VisibilityClientIsVisible) { … }
TEST_F(WindowTest, MouseEventsOnLeafWindowChange) { … }
TEST_F(WindowTest, MouseEventsOnNonLeafWindowDelete) { … }
class RootWindowAttachmentObserver : public WindowObserver { … };
TEST_F(WindowTest, RootWindowAttachment) { … }
class BoundsChangedWindowObserver : public WindowObserver { … };
TEST_F(WindowTest, RootWindowSetWhenReparenting) { … }
TEST_F(WindowTest, OwnedByParentFalse) { … }
class OwningWindowDelegate : public TestWindowDelegate { … };
TEST_F(WindowTest, DeleteWindowFromOnWindowDestroyed) { … }
class DeleteOnVisibilityChangedObserver : public WindowObserver { … };
TEST_F(WindowTest, DeleteParentWindowFromOnWindowVisibiltyChanged) { … }
class BoundsChangeDelegate : public TestWindowDelegate { … };
TEST_F(WindowTest, DelegateNotifiedAsBoundsChange) { … }
TEST_F(WindowTest, DelegateNotifiedAsBoundsChangeInHiddenLayer) { … }
class AddChildNotificationsObserver : public WindowObserver { … };
TEST_F(WindowTest, AddChildNotifications) { … }
TEST_F(WindowTest, DelegateDestroysSelfOnWindowDestroy) { … }
class HierarchyObserver : public WindowObserver { … };
TEST_F(WindowTest, OnWindowHierarchyChange) { … }
class TestLayerAnimationObserver : public ui::LayerAnimationObserver { … };
TEST_F(WindowTest, WindowDestroyCompletesAnimations) { … }
TEST_F(WindowTest, RootWindowUsesCompositorFrameSinkId) { … }
TEST_F(WindowTest, LocalSurfaceIdChanges) { … }
TEST_F(WindowTest, CreateLayerTreeFrameSink) { … }
class HandleGestureEndDelegate : public TestWindowDelegate { … };
TEST_F(WindowTest, CleanupGestureStateChangesWindowHierarchy) { … }
TEST_F(WindowTest, CleanupGestureStateDeleteOtherWindows) { … }
class TestTouchWindowDelegate : public TestWindowDelegate { … };
TEST_F(WindowTest, DeleteWindowWhenCancellingTouch) { … }
class WindowActualScreenBoundsTest
: public WindowTest,
public testing::WithParamInterface<
bool> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(WindowActualScreenBoundsTest, VerifyWindowActualBoundsDuringAnimation) { … }
}
}
}