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

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

Issue 1362283003: Make toPositionInComposedTree() with non-distributed node to return non-null position (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2015-09-24T18:07:50 Created 5 years, 3 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 a1003c21eb8ce2d72e14ce4e47dba1ae60a507dd..835802b042013e891758cb80729009ee02f4a810 100644
--- a/third_party/WebKit/Source/core/editing/PositionTest.cpp
+++ b/third_party/WebKit/Source/core/editing/PositionTest.cpp
@@ -98,6 +98,15 @@ TEST_F(PositionTest, ToPositionInComposedTreeWithInactiveInsertionPoint)
EXPECT_EQ(PositionInComposedTree(anchor, PositionAnchorType::AfterChildren), toPositionInComposedTree(Position(anchor.get(), 1)));
}
+// This test comes from "editing/style/block-style-progress-crash.html".
+TEST_F(PositionTest, ToPositionInComposedTreeWithNotDistributed)
+{
+ setBodyContent("<progress id=sample>foo</progress>");
+ Element* sample = document().getElementById("sample");
+
+ EXPECT_EQ(PositionInComposedTree(sample, PositionAnchorType::AfterChildren), toPositionInComposedTree(Position(sample, 0)));
+}
+
TEST_F(PositionTest, ToPositionInComposedTreeWithShadowRoot)
{
const char* bodyContent = "<p id='host'>00<b id='one'>11</b>22</p>";
« 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