chromium/ui/ozone/platform/wayland/host/wayland_window_unittest.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ui/ozone/platform/wayland/host/wayland_window.h"

#include <cursor-shape-v1-client-protocol.h>
#include <cursor-shapes-unstable-v1-client-protocol.h>
#include <linux/input.h>
#include <wayland-server-core.h>
#include <xdg-shell-server-protocol.h>

#include <cstddef>
#include <memory>
#include <utility>
#include <vector>

#include "base/environment.h"
#include "base/files/file_util.h"
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/nix/xdg_util.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/bind.h"
#include "base/test/mock_callback.h"
#include "base/test/scoped_command_line.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/cursor/mojom/cursor_type.mojom-shared.h"
#include "ui/base/hit_test.h"
#include "ui/base/owned_window_anchor.h"
#include "ui/base/ui_base_types.h"
#include "ui/display/display.h"
#include "ui/display/scoped_display_for_new_windows.h"
#include "ui/display/test/test_screen.h"
#include "ui/display/types/display_constants.h"
#include "ui/events/base_event_utils.h"
#include "ui/events/event.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/geometry/transform.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/overlay_plane_data.h"
#include "ui/gfx/overlay_priority_hint.h"
#include "ui/gfx/overlay_transform.h"
#include "ui/ozone/common/bitmap_cursor.h"
#include "ui/ozone/common/features.h"
#include "ui/ozone/platform/wayland/common/wayland_util.h"
#include "ui/ozone/platform/wayland/host/wayland_buffer_manager_host.h"
#include "ui/ozone/platform/wayland/host/wayland_cursor_shape.h"
#include "ui/ozone/platform/wayland/host/wayland_event_source.h"
#include "ui/ozone/platform/wayland/host/wayland_output.h"
#include "ui/ozone/platform/wayland/host/wayland_output_manager.h"
#include "ui/ozone/platform/wayland/host/wayland_seat.h"
#include "ui/ozone/platform/wayland/host/wayland_subsurface.h"
#include "ui/ozone/platform/wayland/host/wayland_toplevel_window.h"
#include "ui/ozone/platform/wayland/host/wayland_zcr_cursor_shapes.h"
#include "ui/ozone/platform/wayland/mojom/wayland_overlay_config.mojom.h"
#include "ui/ozone/platform/wayland/test/mock_pointer.h"
#include "ui/ozone/platform/wayland/test/mock_surface.h"
#include "ui/ozone/platform/wayland/test/mock_wayland_platform_window_delegate.h"
#include "ui/ozone/platform/wayland/test/mock_xdg_surface.h"
#include "ui/ozone/platform/wayland/test/scoped_wl_array.h"
#include "ui/ozone/platform/wayland/test/test_keyboard.h"
#include "ui/ozone/platform/wayland/test/test_output.h"
#include "ui/ozone/platform/wayland/test/test_region.h"
#include "ui/ozone/platform/wayland/test/test_touch.h"
#include "ui/ozone/platform/wayland/test/test_wayland_server_thread.h"
#include "ui/ozone/platform/wayland/test/test_zaura_toplevel.h"
#include "ui/ozone/platform/wayland/test/wayland_connection_test_api.h"
#include "ui/ozone/platform/wayland/test/wayland_test.h"
#include "ui/ozone/public/ozone_switches.h"
#include "ui/platform_window/platform_window.h"
#include "ui/platform_window/platform_window_delegate.h"
#include "ui/platform_window/platform_window_init_properties.h"
#include "ui/platform_window/wm/wm_move_resize_handler.h"
#include "wayland-server-protocol.h"

#if BUILDFLAG(IS_LINUX)
#include "ui/ozone/platform/wayland/host/wayland_async_cursor.h"
#endif

_;
DoAll;
ElementsAre;
Eq;
InvokeWithoutArgs;
Mock;
Return;
SaveArg;
StrEq;
Values;

namespace ui {

namespace {

constexpr float kDefaultCursorScale =;

constexpr uint32_t kAugmentedSurfaceNotSupportedVersion =;

struct PopupPosition {};

base::ScopedFD MakeFD() {}

// Must happen on the server thread.
wl::TestXdgPopup* GetTestXdgPopupByWindow(wl::TestWaylandServerThread* server,
                                          const uint32_t surface_id) {}

void AddStateToWlArray(uint32_t state, wl_array* states) {}

wl::ScopedWlArray InitializeWlArrayWithActivatedState() {}

wl::ScopedWlArray MakeStateArray(const std::vector<int32_t> states) {}

class MockCursorShape : public WaylandCursorShape {};

class MockZcrCursorShapes : public WaylandZcrCursorShapes {};

BoundsChange;

constexpr BoundsChange kDefaultBoundsChange{};

scoped_refptr<PlatformCursor> AsPlatformCursor(
    scoped_refptr<BitmapCursor> bitmap_cursor) {}

DispatchEventCallback;

class TestWaylandWindowDelegate : public PlatformWindowDelegate {};

}  // namespace

class WaylandWindowTest : public WaylandTest {};

// Regression test for crbug.com/1433175
TEST_P(WaylandWindowTest, Shutdown) {}

TEST_P(WaylandWindowTest, SetTitle) {}

TEST_P(WaylandWindowTest, OnSequencePointConfiguresWaylandWindow) {}

// WaylandSurface state changes are sent to wayland compositor when
// ApplyPendingState() is called.
TEST_P(WaylandWindowTest, ApplyPendingStatesAndCommit) {}

#if BUILDFLAG(IS_LINUX)
// Checks that when the window gets some of its edges tiled, it notifies the
// delegate appropriately.
TEST_P(WaylandWindowTest, HandleTiledEdges) {}
#endif

TEST_P(WaylandWindowTest, DisregardUnpassedWindowConfigure) {}

TEST_P(WaylandWindowTest, MismatchedSequencePoints) {}

TEST_P(WaylandWindowTest, OnSequencePointClearsPreviousUnackedConfigures) {}

// This test is specifically to guard against origin being set to (0, 0)
// thus lacros can be restored to correct display (crbug.com/1423690)
TEST_P(WaylandWindowTest, RestoredBoundsSetWithCorrectOrigin) {}

TEST_P(WaylandWindowTest, MaximizeAndRestore) {}

TEST_P(WaylandWindowTest, MaximizeAndRestoreWithInsets) {}

// Tests the event sequence where a minimize request is initiated by the client.
TEST_P(WaylandWindowTest, ClientInitiatedMinimize) {}

// Tests the event sequence where a minimize event is initiated by the server
// and the client's window is in a non-minimized state.
TEST_P(WaylandWindowTest, ServerInitiatedMinimize) {}

TEST_P(WaylandWindowTest, Minimize) {}

// Tests the event sequence where a toplevel window is minimized and a restore
// event is initiated by the server.
TEST_P(WaylandWindowTest, ServerInitiatedRestoreFromMinimizedState) {}

TEST_P(WaylandWindowTest, SetFullscreenAndRestore) {}

TEST_P(WaylandWindowTest, StartWithFullscreen) {}

TEST_P(WaylandWindowTest, StartMaximized) {}

TEST_P(WaylandWindowTest, CompositorSideStateChanges) {}

TEST_P(WaylandWindowTest, SetMaximizedFullscreenAndRestore) {}

TEST_P(WaylandWindowTest, RestoreBoundsAfterMaximize) {}

TEST_P(WaylandWindowTest, RestoreBoundsAfterFullscreen) {}

TEST_P(WaylandWindowTest, RestoreBoundsAfterMaximizeAndFullscreen) {}

TEST_P(WaylandWindowTest, SetCanMaximize) {}

TEST_P(WaylandWindowTest, SetCanFullscreen) {}

TEST_P(WaylandWindowTest, SendsBoundsOnRequest) {}

TEST_P(WaylandWindowTest, UpdateWindowRegion) {}

TEST_P(WaylandWindowTest, CanDispatchMouseEventFocus) {}

TEST_P(WaylandWindowTest, SetCursorUsesCursorShapeForCommonTypes) {}

TEST_P(WaylandWindowTest, SetCursorCallsCursorShapeOncePerCursor) {}

TEST_P(WaylandWindowTest, SetCursorDoesNotUseCursorShapeForNoneCursor) {}

TEST_P(WaylandWindowTest, SetCursorDoesNotUseCursorShapeForCustomCursors) {}

TEST_P(WaylandWindowTest, SetCursorUsesZcrCursorShapesForCommonTypes) {}

TEST_P(WaylandWindowTest, SetCursorCallsZcrCursorShapesOncePerCursor) {}

TEST_P(WaylandWindowTest, SetCursorDoesNotUseZcrCursorShapesForNoneCursor) {}

TEST_P(WaylandWindowTest, SetCursorDoesNotUseZcrCursorShapesForCustomCursors) {}

ACTION_P(CloneEvent, ptr) {}

TEST_P(WaylandWindowTest, DispatchEvent) {}

TEST_P(WaylandWindowTest, DispatchEventResult) {}

TEST_P(WaylandWindowTest, ConfigureEvent) {}

TEST_P(WaylandWindowTest, ConfigureEventWithNulledSize) {}

TEST_P(WaylandWindowTest, ConfigureEventIsNotAckedMultipleTimes) {}

TEST_P(WaylandWindowTest, ManyConfigureEventsDoesNotCrash) {}

TEST_P(WaylandWindowTest,
       ThrottledConfigureEventsDoNotGetStuckOnHiddenOcclusion) {}

// If the server immediately changes the bounds after a window is initialised,
// make sure that the client doesn't wait for a new frame to be produced.
// See https://crbug.com/1427954.
TEST_P(WaylandWindowTest, InitialConfigureFollowedByBoundsChangeCompletesAck) {}

TEST_P(WaylandWindowTest, OnActivationChanged) {}

TEST_P(WaylandWindowTest, OnAcceleratedWidgetDestroy) {}

TEST_P(WaylandWindowTest, CanCreateMenuWindow) {}

TEST_P(WaylandWindowTest, CreateAndDestroyNestedMenuWindow) {}

TEST_P(WaylandWindowTest, DispatchesLocatedEventsToCapturedWindow) {}

// Verify that located events are translated correctly when the windows have
// geometry with non-zero offset.
// See https://crbug.com/1292486.
TEST_P(WaylandWindowTest, ConvertEventToTarget) {}

// Tests that the event grabber gets the events processed by its toplevel parent
// window iff they belong to the same "family". Otherwise, events mustn't be
// rerouted from another toplevel window to the event grabber.
TEST_P(WaylandWindowTest,
       DispatchesLocatedEventsToCapturedWindowInTheSameStack) {}

TEST_P(WaylandWindowTest, DispatchesKeyboardEventToToplevelWindow) {}

// Tests that event is processed by the surface that has the focus. More
// extensive tests are located in wayland touch/keyboard/pointer unittests.
TEST_P(WaylandWindowTest, CanDispatchEvent) {}

TEST_P(WaylandWindowTest, DispatchWindowMove) {}

// Makes sure hit tests are converted into right edges.
TEST_P(WaylandWindowTest, DispatchWindowResize) {}

TEST_P(WaylandWindowTest, ToplevelWindowUpdateWindowScale) {}

// TODO(crbug.com/328783999): Remove the use of runloops in PostToServerAndWait
TEST_P(WaylandWindowTest, ToplevelWindowOnRotateFocus) {}

// TODO(crbug.com/328783999): Remove the use of runloops in PostToServerAndWait
TEST_P(WaylandWindowTest, ToplevelWindowOnRotateFocus_NotActiveOrNotFocused) {}

TEST_P(WaylandWindowTest, WaylandPopupSurfaceScale) {}

// Tests that WaylandPopup is able to translate provided bounds via
// PlatformWindowProperties using buffer scale it's going to use that the client
// is not able to determine before PlatformWindow is created. See
// WaylandPopup::OnInitialize for more details.
TEST_P(WaylandWindowTest, WaylandPopupInitialBufferScale) {}

TEST_P(WaylandWindowTest, WaylandPopupInitialBufferUsesParentScale) {}

// Tests that a WaylandWindow uses the entered output with largest scale
// factor as the preferred output. If scale factors are equal, the very first
// entered display is used.
TEST_P(WaylandWindowTest, GetPreferredOutput) {}

TEST_P(WaylandWindowTest, GetChildrenPreferredOutput) {}

// Tests that xdg_popup is configured with default anchor properties and bounds
// if delegate doesn't have anchor properties set.
TEST_P(WaylandWindowTest, PopupPassesDefaultAnchorInformation) {}

// Tests that xdg_popup is configured with anchor properties received from
// delegate.
TEST_P(WaylandWindowTest, PopupPassesSetAnchorInformation) {}

TEST_P(WaylandWindowTest, SetBoundsResizesEmptySizes) {}

TEST_P(WaylandWindowTest, SetOpaqueRegion) {}

TEST_P(WaylandWindowTest, OnCloseRequest) {}

TEST_P(WaylandWindowTest, WaylandPopupSimpleParent) {}

TEST_P(WaylandWindowTest, WaylandPopupNestedParent) {}

// Tests that size constraints returned by the `ui::PlatformWindowDelegate` are
// obeyed by the window when its bounds are set internally via its
// SetBoundsInDIP() implementation.
TEST_P(WaylandWindowTest, SizeConstraintsInternal) {}

// Tests that size constraints returned by the `ui::PlatformWindowDelegate` are
// obeyed by the window when its bounds are set externally via the configure
// event sent by the compositor.
TEST_P(WaylandWindowTest, SizeConstraintsExternal) {}

TEST_P(WaylandWindowTest, OnSizeConstraintsChanged) {}

TEST_P(WaylandWindowTest, DestroysCreatesSurfaceOnHideShow) {}

TEST_P(WaylandWindowTest, DestroysCreatesPopupsOnHideShow) {}

TEST_P(WaylandWindowTest, ReattachesBackgroundOnShow) {}

// Tests that if the window gets hidden and shown again, the title, app id and
// size constraints remain the same.
TEST_P(WaylandWindowTest, SetsPropertiesOnShow) {}

// Tests that a popup window is created using the serial of button press
// events as required by the Wayland protocol spec.
TEST_P(WaylandWindowTest, CreatesPopupOnButtonPressSerial) {}

// Tests that a popup window is created using the serial of touch down events
// as required by the Wayland protocol spec.
TEST_P(WaylandWindowTest, CreatesPopupOnTouchDownSerial) {}

// Tests nested menu windows get the topmost window in the stack of windows
// within the same family/tree.
TEST_P(WaylandWindowTest, NestedPopupWindowsGetCorrectParent) {}

TEST_P(WaylandWindowTest, DoesNotGrabPopupIfNoSeat) {}

// Regression test for https://crbug.com/1247799.
TEST_P(WaylandWindowTest, DoesNotGrabPopupUnlessParentHasGrab) {}

TEST_P(WaylandWindowTest, InitialBounds) {}

TEST_P(WaylandWindowTest, PrimarySnappedState) {}

TEST_P(WaylandWindowTest, SecondarySnappedState) {}

#if BUILDFLAG(IS_CHROMEOS_LACROS)

TEST_P(WaylandWindowTest, ImmersiveFullscreen) {
  if (!IsAuraShellEnabled()) {
    GTEST_SKIP();
  }

  testing::NiceMock<MockWaylandPlatformWindowDelegate> delegate_2;
  auto toplevel = CreateWaylandWindowWithParams(
      PlatformWindowType::kWindow, gfx::Rect(10, 10, 200, 200), &delegate_2);

  EXPECT_CALL(delegate_2,
              OnFullscreenTypeChanged(PlatformFullscreenType::kNone,
                                      PlatformFullscreenType::kImmersive))
      .Times(1);
  {
    WaylandWindow::WindowStates window_states;
    window_states.is_maximized = false;
    window_states.is_fullscreen = true;
    window_states.is_immersive_fullscreen = true;
    window_states.is_activated = true;
    toplevel->HandleAuraToplevelConfigure(0, 0, 0, 0, window_states);
  }
  toplevel->HandleSurfaceConfigure(2);
}

TEST_P(WaylandWindowTest, ImmersiveFullscreen_Disabled) {
  if (!IsAuraShellEnabled()) {
    GTEST_SKIP();
  }

  uint32_t serial = 0;

  testing::NiceMock<MockWaylandPlatformWindowDelegate> delegate_2;
  auto toplevel = CreateWaylandWindowWithParams(
      PlatformWindowType::kWindow, gfx::Rect(10, 10, 200, 200), &delegate_2);

  // First we have to enable it, or the top level window will not detect
  // immersive state change.
  {
    WaylandWindow::WindowStates window_states;
    window_states.is_maximized = false;
    window_states.is_fullscreen = true;
    window_states.is_immersive_fullscreen = true;
    window_states.is_activated = true;
    toplevel->HandleAuraToplevelConfigure(0, 0, 0, 0, window_states);
  }
  toplevel->HandleSurfaceConfigure(++serial);

  EXPECT_CALL(delegate_2,
              OnFullscreenTypeChanged(PlatformFullscreenType::kImmersive,
                                      PlatformFullscreenType::kNone))
      .Times(1);
  {
    WaylandWindow::WindowStates window_states;
    window_states.is_maximized = false;
    window_states.is_fullscreen = false;
    window_states.is_immersive_fullscreen = false;
    window_states.is_activated = true;
    toplevel->HandleAuraToplevelConfigure(0, 0, 0, 0, window_states);
  }
  toplevel->HandleSurfaceConfigure(++serial);
}

#endif

namespace {

class WaylandSubsurfaceTest : public WaylandWindowTest {};

}  // namespace

// Tests integer and non integer size/position support with and without surface
// augmenter.
TEST_P(WaylandSubsurfaceTest, OneWaylandSubsurfaceInteger) {}

TEST_P(WaylandSubsurfaceTest, OneWaylandSubsurfaceNonInteger) {}

TEST_P(WaylandSubsurfaceTest, NoDuplicateSubsurfaceRequests) {}

TEST_P(WaylandWindowTest, NoDuplicateViewporterRequests) {}

// Tests that WaylandPopups can be repositioned.
TEST_P(WaylandWindowTest, RepositionPopups) {}

// If buffers are not attached (aka WaylandBufferManagerHost is not used for
// buffer management), WaylandSurface::Commit mustn't result in creation of
// surface sync.
TEST_P(WaylandWindowTest, DoesNotCreateSurfaceSyncOnCommitWithoutBuffers) {}

TEST_P(WaylandWindowTest, StartWithMinimized) {}

class BlockableWaylandToplevelWindow : public WaylandToplevelWindow {};

// This test ensures that Ozone/Wayland does not crash while handling a
// sequence of two or more touch down/up actions, where the first one blocks
// unfinished before the second pair comes in.
//
// This mimics the behavior of a modal dialog that comes up as a result of
// the first touch down/up action, and blocks the original flow, before it gets
// handled completely.
TEST_P(WaylandWindowTest, BlockingTouchDownUp_NoCrash) {}

// Make sure that changing focus during dispatch will not re-dispatch the event
// to the newly focused window. (crbug.com/1339082);
// Flaky on device/VM: https://crbug.com/1348046
TEST_P(WaylandWindowTest, ChangeFocusDuringDispatch) {}

TEST_P(WaylandWindowTest, WindowMovedResized) {}

// Make sure that creating a window with DIP bounds creates a window with
// the same DIP bounds with various fractional scales.
TEST_P(WaylandWindowTest, NoRoundingErrorInDIP) {}

// Make sure that the window scale change is applied on the latest
// in_flight_requests.
TEST_P(WaylandWindowTest, ScaleChangeWhenStateRequestThrottoled) {}

// Asserts the server receives the correct region when SetShape() is called for
// toplevel windows.
TEST_P(WaylandWindowTest, SetShape) {}

#if BUILDFLAG(IS_CHROMEOS_LACROS)
// Asserts the server receives the correct height when `SetTopInset()` is called
// for toplevel windows.
TEST_P(WaylandWindowTest, SetTopInset) {
  // `SetTopInset()` is only supported with zaura_shell.
  if (!IsAuraShellEnabled()) {
    GTEST_SKIP();
  }

  MockWaylandPlatformWindowDelegate delegate;
  std::unique_ptr<WaylandWindow> toplevel_window =
      CreateWaylandWindowWithParams(PlatformWindowType::kWindow,
                                    gfx::Rect(300, 300), &delegate);

  toplevel_window->AsWaylandToplevelWindow()->SetTopInset(32);

  // Validate the server has received the appropriate top inset for the
  // toplevel.
  PostToServerAndWait([&](wl::TestWaylandServerThread* server) {
    auto* surface = server->GetObject<wl::MockSurface>(
        toplevel_window->root_surface()->get_surface_id());
    ASSERT_TRUE(surface);

    wl::TestZAuraToplevel* zaura_toplevel =
        surface->xdg_surface()->xdg_toplevel()->zaura_toplevel();
    ASSERT_TRUE(zaura_toplevel);
    EXPECT_EQ(32, zaura_toplevel->top_inset());
  });

  toplevel_window->AsWaylandToplevelWindow()->SetTopInset(0);

  // Validate the server has received the appropriate top inset for the
  // toplevel.
  PostToServerAndWait([&](wl::TestWaylandServerThread* server) {
    auto* surface = server->GetObject<wl::MockSurface>(
        toplevel_window->root_surface()->get_surface_id());
    ASSERT_TRUE(surface);

    wl::TestZAuraToplevel* zaura_toplevel =
        surface->xdg_surface()->xdg_toplevel()->zaura_toplevel();
    ASSERT_TRUE(zaura_toplevel);
    EXPECT_EQ(0, zaura_toplevel->top_inset());
  });
}

// Tests that the platform window gets the notification when overview mode
// changes.
TEST_P(WaylandWindowTest, OverviewMode) {
  // Only supported with zaura_shell.
  if (!IsAuraShellEnabled()) {
    GTEST_SKIP();
  }

  EXPECT_CALL(delegate_, OnOverviewModeChanged(Eq(true))).Times(1);
  PostToServerAndWait([&](wl::TestWaylandServerThread* server) {
    auto* surface = server->GetObject<wl::MockSurface>(surface_id_);
    auto* toplevel = surface->xdg_surface()->xdg_toplevel()->zaura_toplevel();
    zaura_toplevel_send_overview_change(toplevel->resource(),
                                        ZAURA_TOPLEVEL_IN_OVERVIEW_IN_OVERVIEW);
  });

  EXPECT_CALL(delegate_, OnOverviewModeChanged(Eq(false))).Times(1);
  PostToServerAndWait([&](wl::TestWaylandServerThread* server) {
    auto* surface = server->GetObject<wl::MockSurface>(surface_id_);
    auto* toplevel = surface->xdg_surface()->xdg_toplevel()->zaura_toplevel();
    zaura_toplevel_send_overview_change(
        toplevel->resource(), ZAURA_TOPLEVEL_IN_OVERVIEW_NOT_IN_OVERVIEW);
  });
}
#endif

// Tests setting and unsetting float state on a wayland toplevel window.
TEST_P(WaylandWindowTest, SetUnsetFloat) {}

TEST_P(WaylandWindowTest,
       UnsynchronizedOcclusionStateNotOverridenByConfigureOcclusionState) {}

// Tests that a re-entrant state update is handled serially by `WaylandWindow`
// and does not crash.
TEST_P(WaylandWindowTest, ReentrantApplyStateWorks) {}

// Tests that configuring twice with the same state immediately acks and
// commits.
TEST_P(WaylandWindowTest, ConfigureWithSameStateAcksAndCommitsImmediately) {}

// Test that creates a screen with two displays, with work areas configured to
// be side-by-side horizontally.
class MultiDisplayWaylandWindowTest : public WaylandWindowTest {};

// Asserts new windows have their bounds set on the display for new windows if
// init bounds are unspecified.
TEST_P(MultiDisplayWaylandWindowTest, SetsNewWindowBoundsToCorrectDisplay) {}

// Asserts new windows ignore the display for new windows if bounds have been
// explicitly specified.
TEST_P(MultiDisplayWaylandWindowTest, NewWindowsRespectInitParamBounds) {}

#if !BUILDFLAG(IS_CHROMEOS_LACROS)
INSTANTIATE_TEST_SUITE_P();
INSTANTIATE_TEST_SUITE_P();
#else
INSTANTIATE_TEST_SUITE_P(
    XdgVersionStableTestWithAuraShell,
    WaylandWindowTest,
    Values(wl::ServerConfig{
        .enable_aura_shell = wl::EnableAuraShellProtocol::kEnabled}));
INSTANTIATE_TEST_SUITE_P(
    XdgVersionStableTestWithAuraShell,
    MultiDisplayWaylandWindowTest,
    Values(wl::ServerConfig{
        .enable_aura_shell = wl::EnableAuraShellProtocol::kEnabled}));
#endif

#if !BUILDFLAG(IS_CHROMEOS_LACROS)
INSTANTIATE_TEST_SUITE_P();

#else
INSTANTIATE_TEST_SUITE_P(
    XdgVersionStableTestWithAuraShell,
    WaylandSubsurfaceTest,
    Values(wl::ServerConfig{
        .enable_aura_shell = wl::EnableAuraShellProtocol::kEnabled}));
#endif

}  // namespace ui