Index: third_party/WebKit/Source/core/dom/RangeTest.cpp |
diff --git a/third_party/WebKit/Source/core/dom/RangeTest.cpp b/third_party/WebKit/Source/core/dom/RangeTest.cpp |
index ddf5150870ac8d9b058de89ebf5fa4f47856fa92..946f9ad4f7b227105066931a99a9b07da7a05c60 100644 |
--- a/third_party/WebKit/Source/core/dom/RangeTest.cpp |
+++ b/third_party/WebKit/Source/core/dom/RangeTest.cpp |
@@ -16,6 +16,7 @@ |
#include "core/html/HTMLDocument.h" |
#include "core/html/HTMLElement.h" |
#include "core/html/HTMLHtmlElement.h" |
+#include "core/html/HTMLTextAreaElement.h" |
#include "platform/heap/Handle.h" |
#include "testing/gtest/include/gtest/gtest.h" |
#include "wtf/Compiler.h" |
@@ -249,4 +250,13 @@ TEST_F(RangeTest, MultipleTextQuads) { |
EXPECT_EQ(2u, quads.size()); |
} |
+TEST_F(RangeTest, ToPosition) { |
+ Node& textarea = *HTMLTextAreaElement::create(document()); |
+ Range& range = *Range::create(document()); |
+ const Position position = Position(&textarea, 0); |
+ range.setStart(position, ASSERT_NO_EXCEPTION); |
+ EXPECT_EQ(position, range.startPosition()); |
+ EXPECT_EQ(position, range.endPosition()); |
+} |
+ |
} // namespace blink |