Index: third_party/WebKit/Source/core/editing/iterators/TextIteratorTest.cpp |
diff --git a/third_party/WebKit/Source/core/editing/iterators/TextIteratorTest.cpp b/third_party/WebKit/Source/core/editing/iterators/TextIteratorTest.cpp |
index 46b11e94f93c1601fa2d3adda753f0a7a85d10c7..1ecccdd2c63dbaa0548da4417c212de7dfcc115e 100644 |
--- a/third_party/WebKit/Source/core/editing/iterators/TextIteratorTest.cpp |
+++ b/third_party/WebKit/Source/core/editing/iterators/TextIteratorTest.cpp |
@@ -533,4 +533,13 @@ TEST_F(TextIteratorTest, PreserveLeadingSpace) |
EXPECT_EQ("foo bar", plainText(EphemeralRange(start, end), TextIteratorEmitsImageAltText)); |
} |
+TEST_F(TextIteratorTest, PreserveOnlyLeadingSpace) |
+{ |
+ setBodyContent("<div style='width: 2em;'><b><i id='foo'>foo </i></b> bar</div>"); |
+ Element* div = document().querySelector("div"); |
+ Position start(document().getElementById("foo")->firstChild(), 0); |
+ Position end(div->lastChild(), 4); |
+ EXPECT_EQ("foo bar", plainText(EphemeralRange(start, end), TextIteratorEmitsImageAltText)); |
+} |
+ |
} // namespace blink |