#include "third_party/blink/renderer/core/editing/ime/stylus_writing_gesture.h"
#include <gtest/gtest.h>
#include "third_party/blink/public/mojom/input/stylus_writing_gesture.mojom-blink.h"
#include "third_party/blink/renderer/core/css/style_engine.h"
#include "third_party/blink/renderer/core/dom/text.h"
#include "third_party/blink/renderer/core/editing/frame_selection.h"
#include "third_party/blink/renderer/core/html/forms/html_input_element.h"
#include "third_party/blink/renderer/core/html/forms/html_text_area_element.h"
#include "third_party/blink/renderer/core/testing/sim/sim_request.h"
#include "third_party/blink/renderer/core/testing/sim/sim_test.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"
#include <vector>
namespace blink {
namespace {
struct TestCase { … };
auto BoolToDirection(const testing::TestParamInfo<bool> is_RTL) { … }
class TestWebFrameClientImpl : public frame_test_helpers::TestWebFrameClient { … };
}
class StylusWritingGestureTest : public SimTest,
public testing::WithParamInterface<bool> { … };
Element& StylusWritingGestureTest::SetUpElement(String element) { … }
HTMLInputElement* StylusWritingGestureTest::SetUpSingleInput(bool is_RTL) { … }
HTMLTextAreaElement* StylusWritingGestureTest::SetUpMultilineInput(
bool is_RTL) { … }
gfx::Rect StylusWritingGestureTest::GetRect(int x,
int y,
int width,
int height,
int input_width,
bool is_RTL) const { … }
TEST_P(StylusWritingGestureTest, TestGestureDelete) { … }
TEST_P(StylusWritingGestureTest, TestGestureDeleteWithWordGranularity) { … }
TEST_P(StylusWritingGestureTest, TestGestureDeleteNotFirstLine) { … }
TEST_P(StylusWritingGestureTest, TestGestureAtEndOfLineWithWordGranularity) { … }
TEST_P(StylusWritingGestureTest, TestGestureDeleteMultiline) { … }
TEST_P(StylusWritingGestureTest,
TestGestureDeleteMultilinePartiallyOutsideBounds) { … }
TEST_P(StylusWritingGestureTest, TestGestureRemoveSpaces) { … }
TEST_P(StylusWritingGestureTest, TestGestureRemoveFirstSpace) { … }
TEST_P(StylusWritingGestureTest, TestGestureSelect) { … }
TEST_P(StylusWritingGestureTest, TestGestureSelectsNoSpacesEitherSide) { … }
TEST_P(StylusWritingGestureTest, TestGestureSelectMultiline) { … }
TEST_P(StylusWritingGestureTest, TestGestureSelectPartiallyOutsideBounds) { … }
TEST_P(StylusWritingGestureTest, TestGestureAddSpaceOrText) { … }
TEST_P(StylusWritingGestureTest, TestGestureSplitOrMerge_RemovesAllSpaces) { … }
TEST_P(StylusWritingGestureTest, TestGestureSplitOrMerge_NonEmptyInput) { … }
TEST_P(StylusWritingGestureTest, TestGestureSplitOrMerge_EmptyInput) { … }
INSTANTIATE_TEST_SUITE_P(…);
}