Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Unified Diff: third_party/WebKit/Source/core/dom/RangeTest.cpp

Issue 2786853002: Let RangeBoundaryPoint::toPoisition return Position not considering Editing (Closed)
Patch Set: Rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698