chromium/ui/views/controls/textarea/textarea_unittest.cc

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

#include "ui/views/controls/textarea/textarea.h"

#include <memory>
#include <string>
#include <vector>

#include "base/format_macros.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "ui/base/ui_base_features.h"
#include "ui/events/event.h"
#include "ui/gfx/render_text.h"
#include "ui/gfx/render_text_test_api.h"
#include "ui/strings/grit/ui_strings.h"
#include "ui/views/controls/textfield/textfield_test_api.h"
#include "ui/views/controls/textfield/textfield_unittest.h"
#include "ui/views/style/platform_style.h"
#include "ui/views/widget/widget.h"

namespace {

const char16_t kHebrewLetterSamekh =;

}  // namespace

namespace views {
namespace {

class TextareaTest : public test::TextfieldTest {};

}  // namespace

// Disabled when using XKB for crbug.com/1171828.
#if BUILDFLAG(USE_XKBCOMMON)
#define MAYBE_InsertNewlineTest
#else
#define MAYBE_InsertNewlineTest
#endif  // BUILDFLAG(USE_XKBCOMMON)
TEST_F(TextareaTest, MAYBE_InsertNewlineTest) {}

TEST_F(TextareaTest, PasteNewlineTest) {}

// Re-enable when crbug.com/1163587 is fixed.
TEST_F(TextareaTest, DISABLED_CursorMovement) {}

// Ensure cursor view is always inside display rect.
TEST_F(TextareaTest, CursorViewBounds) {}

TEST_F(TextareaTest, LineSelection) {}

// Disabled on Mac for crbug.com/1171826.
#if BUILDFLAG(IS_MAC)
#define MAYBE_MoveUpDownAndModifySelection
#else
#define MAYBE_MoveUpDownAndModifySelection
#endif  // BUILDFLAG(IS_MAC)
TEST_F(TextareaTest, MAYBE_MoveUpDownAndModifySelection) {}

TEST_F(TextareaTest, MovePageUpDownAndModifySelection) {}

// Ensure the textarea breaks the long word and scrolls on overflow.
TEST_F(TextareaTest, OverflowTest) {}

TEST_F(TextareaTest, OverflowInRTLTest) {}

TEST_F(TextareaTest, OnBlurTest) {}

TEST_F(TextareaTest, MoveRangeSelectionExtentExpandByWord) {}

TEST_F(TextareaTest, MoveRangeSelectionExtentShrinkByCharacter) {}

}  // namespace views