chromium/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc

// Copyright 2014 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/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h"

#include <stddef.h>
#include <stdint.h>
#include <xkbcommon/xkbcommon-names.h>

#include <string_view>
#include <tuple>

#include "base/memory/raw_ptr.h"
#include "build/chromeos_buildflags.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/event_constants.h"
#include "ui/events/keycodes/dom/dom_code.h"
#include "ui/events/keycodes/dom/dom_key.h"
#include "ui/events/keycodes/keyboard_code_conversion.h"
#include "ui/events/keycodes/keyboard_codes_posix.h"
#include "ui/events/ozone/layout/scoped_keyboard_layout_engine.h"

namespace ui {

namespace {

// This XkbKeyCodeConverter simply uses the numeric value of the DomCode.
class VkTestXkbKeyCodeConverter : public XkbKeyCodeConverter {};

// This mock XkbKeyboardLayoutEngine fakes a layout that succeeds only when the
// supplied keycode matches its |Entry|, in which case it supplies DomKey::NONE
// and a character that depends on the flags.
class VkTestXkbKeyboardLayoutEngine : public XkbKeyboardLayoutEngine {};

}  // anonymous namespace

class XkbLayoutEngineVkTest : public testing::Test {};

TEST_F(XkbLayoutEngineVkTest, KeyboardCodeForPrintable) {}

TEST_F(XkbLayoutEngineVkTest, KeyboardCodeForNonPrintable) {}


TEST_F(XkbLayoutEngineVkTest, XkbRuleNamesForLayoutName) {}

TEST_F(XkbLayoutEngineVkTest, GetDomCodeByKeysym) {}

}  // namespace ui