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

Unified Diff: Source/core/editing/FrameSelectionTest.cpp

Issue 675413003: WebLocalFrameImpl::selectWordAroundPosition should select a word before space. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update Created 6 years, 2 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 | « Source/core/editing/FrameSelection.cpp ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/FrameSelectionTest.cpp
diff --git a/Source/core/editing/FrameSelectionTest.cpp b/Source/core/editing/FrameSelectionTest.cpp
index 2aea63be379eab58fcfb09c86e29415cfadeeaae..acaf7d96c8689ec6ffc59cf98f482692f1f135c8 100644
--- a/Source/core/editing/FrameSelectionTest.cpp
+++ b/Source/core/editing/FrameSelectionTest.cpp
@@ -138,4 +138,12 @@ TEST_F(FrameSelectionTest, PaintCaretShouldNotLayout)
EXPECT_EQ(startCount, layoutCount());
}
+TEST_F(FrameSelectionTest, SelectWordAroundPosition)
donnd 2014/10/29 22:41:37 Maybe add a couple more tests, like the normal cas
+{
+ RefPtrWillBeRawPtr<Text> text = document().createTextNode("Hello World!");
+ document().body()->appendChild(text);
+ selection().selectWordAroundPosition(VisiblePosition(Position(text, 5)));
+ EXPECT_EQ("Hello", WebString(selection().selectedText()).utf8());
+}
+
}
« no previous file with comments | « Source/core/editing/FrameSelection.cpp ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698