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

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

#include <wayland-server-core.h>

#include "base/debug/crash_logging.h"
#include "base/environment.h"
#include "base/i18n/number_formatting.h"
#include "base/nix/xdg_util.h"
#include "base/strings/strcat.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/bind.h"
#include "components/crash/core/common/crash_key.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/ozone/platform/wayland/test/mock_surface.h"
#include "ui/ozone/platform/wayland/test/test_wayland_server_thread.h"
#include "ui/ozone/platform/wayland/test/wayland_test.h"

Values;

namespace ui {

namespace {

std::string NumberToString(uint32_t number) {}

}  // namespace

// Tests that various types of critical errors result in correct crash keys.
//
// Posting the error terminates the client-server connection.  Further attempts
// to sync will hang.  That is why we run "bare" lambdas in all tests of this
// suite instead of using `PostToServerAndWait()`: that helper syncs the
// connection after running the server task.  Due to the same reason we disable
// the sync on the test tear down.  To ensure that the error message is caught
// by the crash reporter, we wait until idle in the end of each test before
// checking the crash key value.
class WaylandEventWatcherTest : public WaylandTestSimple {};

TEST_F(WaylandEventWatcherTest, CrashKeyResourceError) {}

TEST_F(WaylandEventWatcherTest, CrashKeyResourceNoMemory) {}

TEST_F(WaylandEventWatcherTest, CrashKeyClientNoMemoryError) {}

TEST_F(WaylandEventWatcherTest, CrashKeyClientImplementationError) {}

TEST_F(WaylandEventWatcherTest, CrashKeyCompositorNameSet) {}

TEST_F(WaylandEventWatcherTest, CrashKeyCompositorNameUnset) {}

}  // namespace ui