| Index: third_party/WebKit/Source/core/html/TextControlElementTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/TextControlElementTest.cpp b/third_party/WebKit/Source/core/html/TextControlElementTest.cpp
|
| index e5d47c5b0a5527c0f4dcb44c3b801cd491da3235..2b996cb0de19414a9418a7c4d2d68c757d255428 100644
|
| --- a/third_party/WebKit/Source/core/html/TextControlElementTest.cpp
|
| +++ b/third_party/WebKit/Source/core/html/TextControlElementTest.cpp
|
| @@ -210,4 +210,18 @@ TEST_F(TextControlElementTest, IndexForPosition) {
|
| Position(innerEditor, PositionAnchorType::AfterAnchor)));
|
| }
|
|
|
| +TEST_F(TextControlElementTest, EnclosingTextControl) {
|
| + textControl().setValue("foobar");
|
| + EXPECT_EQ(nullptr, enclosingTextControl(Position(&document(), 0)));
|
| + EXPECT_EQ(nullptr, enclosingTextControl(Position(&textControl(), 0)));
|
| + EXPECT_EQ(&textControl(), enclosingTextControl(Position(
|
| + textControl().innerEditorElement(), 0)));
|
| + EXPECT_EQ(&textControl(),
|
| + enclosingTextControl(
|
| + Position(textControl().innerEditorElement()->firstChild(), 0)));
|
| + EXPECT_EQ(nullptr,
|
| + enclosingTextControl(Position(textControl().innerEditorElement(),
|
| + PositionAnchorType::BeforeAnchor)));
|
| +}
|
| +
|
| } // namespace blink
|
|
|