chromium/third_party/blink/renderer/core/editing/granularity_strategy_test.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.

#include <memory>
#include "base/memory/scoped_refptr.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/element.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/editing/local_caret_rect.h"
#include "third_party/blink/renderer/core/editing/selection_template.h"
#include "third_party/blink/renderer/core/editing/testing/editing_test_base.h"
#include "third_party/blink/renderer/core/editing/visible_position.h"
#include "third_party/blink/renderer/core/editing/visible_selection.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/html/html_body_element.h"
#include "third_party/blink/renderer/core/html/html_span_element.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"

namespace blink {

#define EXPECT_EQ_SELECTED_TEXT(text)

gfx::Point VisiblePositionToContentsPoint(const VisiblePosition& pos) {}

TextNodeVector;

class GranularityStrategyTest : public EditingTestBase {};

void GranularityStrategyTest::SetUp() {}

Text* GranularityStrategyTest::AppendTextNode(const String& data) {}

void GranularityStrategyTest::SetInnerHTML(const char* html_content) {}

void GranularityStrategyTest::ParseText(Text* text) {}

void GranularityStrategyTest::ParseText(const TextNodeVector& text_nodes) {}

Text* GranularityStrategyTest::SetupTranslateZ(String str) {}

Text* GranularityStrategyTest::SetupTransform(String str) {}

Text* GranularityStrategyTest::SetupRotate(String str) {}

void GranularityStrategyTest::SetupTextSpan(String str1,
                                            String str2,
                                            String str3,
                                            wtf_size_t sel_begin,
                                            wtf_size_t sel_end) {}

void GranularityStrategyTest::SetupVerticalAlign(String str1,
                                                 String str2,
                                                 String str3,
                                                 wtf_size_t sel_begin,
                                                 wtf_size_t sel_end) {}

void GranularityStrategyTest::SetupFontSize(String str1,
                                            String str2,
                                            String str3,
                                            wtf_size_t sel_begin,
                                            wtf_size_t sel_end) {}

// Tests expanding selection on text "abcdef ghij kl mno^p|>qr stuvwi inm mnii,"
// (^ means base, | means extent, < means start, and > means end). Text needs to
// be laid out on a single line with no rotation.
void GranularityStrategyTest::TestDirectionExpand() {}

// Tests shrinking selection on text "abcdef ghij kl mno^pqr|> iiinmni, abc"
// (^ means base, | means extent, < means start, and > means end).
// Text needs to be laid out on a single line with no rotation.
void GranularityStrategyTest::TestDirectionShrink() {}

// Tests moving selection extent over to the other side of the base
// on text "abcd efgh ijkl mno^pqr|> iiinmni, abc"
// (^ means base, | means extent, < means start, and > means end).
// Text needs to be laid out on a single line with no rotation.
void GranularityStrategyTest::TestDirectionSwitchSide() {}

// Test for the default CharacterGranularityStrategy
TEST_F(GranularityStrategyTest, Character) {}

// DirectionGranularityStrategy strategy on rotated text should revert to the
// same behavior as CharacterGranularityStrategy
TEST_F(GranularityStrategyTest, DirectionRotate) {}

TEST_F(GranularityStrategyTest, DirectionExpandTranslateZ) {}

TEST_F(GranularityStrategyTest, DirectionExpandTransform) {}

TEST_F(GranularityStrategyTest, DirectionExpandVerticalAlign) {}

TEST_F(GranularityStrategyTest, DirectionExpandFontSizes) {}

TEST_F(GranularityStrategyTest, DirectionShrinkTranslateZ) {}

TEST_F(GranularityStrategyTest, DirectionShrinkTransform) {}

TEST_F(GranularityStrategyTest, DirectionShrinkVerticalAlign) {}

TEST_F(GranularityStrategyTest, DirectionShrinkFontSizes) {}

TEST_F(GranularityStrategyTest, DirectionSwitchSideTranslateZ) {}

TEST_F(GranularityStrategyTest, DirectionSwitchSideTransform) {}

TEST_F(GranularityStrategyTest, DirectionSwitchSideVerticalAlign) {}

TEST_F(GranularityStrategyTest, DirectionSwitchSideFontSizes) {}

// Tests moving extent over to the other side of the vase and immediately
// passing the word boundary and going into word granularity.
TEST_F(GranularityStrategyTest, DirectionSwitchSideWordGranularityThenShrink) {}

// Make sure we switch to word granularity right away when starting on a
// word boundary and extending.
TEST_F(GranularityStrategyTest, DirectionSwitchStartOnBoundary) {}

// For http://crbug.com/704529
TEST_F(GranularityStrategyTest, UpdateExtentWithNullPositionForCharacter) {}

// For http://crbug.com/704529
TEST_F(GranularityStrategyTest, UpdateExtentWithNullPositionForDirectional) {}

// For http://crbug.com/974728
TEST_F(GranularityStrategyTest, UpdateExtentWithNullNextWordBound) {}

}  // namespace blink