#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ui/ozone/platform/wayland/host/wayland_clipboard.h"
#include <linux/input.h>
#include <wayland-server.h>
#include <cstring>
#include <memory>
#include <string>
#include <vector>
#include "base/containers/flat_set.h"
#include "base/functional/bind.h"
#include "base/functional/callback_forward.h"
#include "base/location.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/test/bind.h"
#include "base/test/mock_callback.h"
#include "build/buildflag.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/clipboard/clipboard_buffer.h"
#include "ui/base/clipboard/clipboard_constants.h"
#include "ui/events/base_event_utils.h"
#include "ui/gfx/geometry/point.h"
#include "ui/ozone/platform/wayland/host/wayland_keyboard.h"
#include "ui/ozone/platform/wayland/host/wayland_pointer.h"
#include "ui/ozone/platform/wayland/host/wayland_seat.h"
#include "ui/ozone/platform/wayland/host/wayland_serial_tracker.h"
#include "ui/ozone/platform/wayland/host/wayland_touch.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/test_data_device.h"
#include "ui/ozone/platform/wayland/test/test_data_device_manager.h"
#include "ui/ozone/platform/wayland/test/test_data_offer.h"
#include "ui/ozone/platform/wayland/test/test_data_source.h"
#include "ui/ozone/platform/wayland/test/test_keyboard.h"
#include "ui/ozone/platform/wayland/test/test_selection_device_manager.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/wayland_test.h"
#include "ui/ozone/public/platform_clipboard.h"
_;
Eq;
IsEmpty;
IsNull;
Mock;
Values;
namespace ui {
namespace {
constexpr char kSampleClipboardText[] = …;
template <typename StringType>
ui::PlatformClipboard::Data ToClipboardData(const StringType& data_string) { … }
wl::TestSelectionDevice* GetSelectionDevice(wl::TestWaylandServerThread* server,
ClipboardBuffer buffer) { … }
wl::TestSelectionSource* GetSelectionSource(wl::TestWaylandServerThread* server,
ClipboardBuffer buffer) { … }
}
class WaylandClipboardTestBase : public WaylandTest { … };
class WaylandClipboardTest : public WaylandClipboardTestBase { … };
class CopyPasteOnlyClipboardTest : public WaylandClipboardTestBase { … };
TEST_P(WaylandClipboardTest, DISABLED_WriteToClipboard) { … }
TEST_P(WaylandClipboardTest, ReadFromClipboard) { … }
TEST_P(WaylandClipboardTest, ReadFromClipboardPrioritizeUtf) { … }
TEST_P(WaylandClipboardTest, ReadFromClipboardWithoutOffer) { … }
TEST_P(WaylandClipboardTest, IsSelectionOwner) { … }
TEST_P(WaylandClipboardTest, OverlapReadingFromDifferentBuffers) { … }
TEST_P(WaylandClipboardTest, ClipboardChangeNotifications) { … }
TEST_P(CopyPasteOnlyClipboardTest, PrimarySelectionRequestsNoop) { … }
TEST_P(CopyPasteOnlyClipboardTest, DISABLED_OverlappingReadRequests) { … }
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
}