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

Unified Diff: third_party/WebKit/Source/core/editing/PositionTest.cpp

Issue 2229463003: Make toPositionInFlatTree() to handle a position anchored by shadow root (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-08-09T14:04:01 Created 4 years, 4 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/editing/Position.cpp ('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/editing/PositionTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/PositionTest.cpp b/third_party/WebKit/Source/core/editing/PositionTest.cpp
index 97c036feea3e7f50af452ae4ea0c2a26563d0e98..1c775caac98960370a10dda4f6e9983e7667c1c9 100644
--- a/third_party/WebKit/Source/core/editing/PositionTest.cpp
+++ b/third_party/WebKit/Source/core/editing/PositionTest.cpp
@@ -139,6 +139,14 @@ TEST_F(PositionTest, ToPositionInFlatTreeWithShadowRoot)
EXPECT_EQ(PositionInFlatTree(host, 0), toPositionInFlatTree(Position(shadowRoot, 0)));
EXPECT_EQ(PositionInFlatTree(host, PositionAnchorType::AfterChildren), toPositionInFlatTree(Position(shadowRoot, 1)));
+ EXPECT_EQ(PositionInFlatTree(host, PositionAnchorType::AfterChildren),
+ toPositionInFlatTree(Position(shadowRoot, PositionAnchorType::AfterChildren)));
+ EXPECT_EQ(PositionInFlatTree(host, PositionAnchorType::BeforeChildren),
+ toPositionInFlatTree(Position(shadowRoot, PositionAnchorType::BeforeChildren)));
+ EXPECT_EQ(PositionInFlatTree(host, PositionAnchorType::AfterAnchor),
+ toPositionInFlatTree(Position(shadowRoot, PositionAnchorType::AfterAnchor)));
+ EXPECT_EQ(PositionInFlatTree(host, PositionAnchorType::BeforeAnchor),
+ toPositionInFlatTree(Position(shadowRoot, PositionAnchorType::BeforeAnchor)));
}
TEST_F(PositionTest, ToPositionInFlatTreeWithShadowRootContainingSingleContent)
« no previous file with comments | « third_party/WebKit/Source/core/editing/Position.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698