chromium/third_party/blink/renderer/core/editing/suggestion/text_suggestion_controller_test.cc

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

#include "third_party/blink/renderer/core/editing/suggestion/text_suggestion_controller.h"

#include "build/build_config.h"
#include "third_party/blink/renderer/core/editing/ephemeral_range.h"
#include "third_party/blink/renderer/core/editing/frame_selection.h"
#include "third_party/blink/renderer/core/editing/markers/document_marker_controller.h"
#include "third_party/blink/renderer/core/editing/markers/suggestion_marker_properties.h"
#include "third_party/blink/renderer/core/editing/selection_template.h"
#include "third_party/blink/renderer/core/editing/spellcheck/spell_checker.h"
#include "third_party/blink/renderer/core/editing/testing/editing_test_base.h"
#include "third_party/blink/renderer/core/editing/visible_selection.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"

ImeTextSpanThickness;
ImeTextSpanUnderlineStyle;

namespace blink {

class TextSuggestionControllerTest : public EditingTestBase {};

TEST_F(TextSuggestionControllerTest, ApplySpellCheckSuggestion) {}

// Flaky on Android: http://crbug.com/1104700
#if BUILDFLAG(IS_ANDROID)
#define MAYBE_ApplyTextSuggestion
#else
#define MAYBE_ApplyTextSuggestion
#endif
TEST_F(TextSuggestionControllerTest, MAYBE_ApplyTextSuggestion) {}

TEST_F(TextSuggestionControllerTest,
       ApplyingMisspellingTextSuggestionClearsMarker) {}

TEST_F(TextSuggestionControllerTest,
       ApplyingMisspellingTextSuggestionShouldNotChangeDOM) {}

TEST_F(TextSuggestionControllerTest, DeleteActiveSuggestionRange_DeleteAtEnd) {}

TEST_F(TextSuggestionControllerTest,
       DeleteActiveSuggestionRange_DeleteInMiddle) {}

TEST_F(TextSuggestionControllerTest,
       DeleteActiveSuggestionRange_DeleteAtBeginningWithSpaceAfter) {}

TEST_F(TextSuggestionControllerTest,
       DeleteActiveSuggestionRange_DeleteEntireRange) {}

// The following two cases test situations that probably shouldn't occur in
// normal use (spell check/suggestoin markers not spanning a whole word), but
// are included anyway to verify that DeleteActiveSuggestionRange() is
// well-behaved in these cases

TEST_F(TextSuggestionControllerTest,
       DeleteActiveSuggestionRange_DeleteRangeWithTextBeforeAndSpaceAfter) {}

TEST_F(TextSuggestionControllerTest,
       DeleteActiveSuggestionRange_DeleteRangeWithSpaceBeforeAndTextAfter) {}

TEST_F(TextSuggestionControllerTest,
       DeleteActiveSuggestionRange_DeleteAtBeginningWithTextAfter) {}

TEST_F(TextSuggestionControllerTest,
       DeleteActiveSuggestionRange_OnNewWordAddedToDictionary) {}

TEST_F(TextSuggestionControllerTest, CallbackHappensAfterDocumentDestroyed) {}

TEST_F(TextSuggestionControllerTest, SuggestionMarkerWithEmptySuggestion) {}

TEST_F(TextSuggestionControllerTest, SuggestionMarkerWithSuggestion) {}

}  // namespace blink