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

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

Issue 2233573002: Revert of Fix setComposingText with empty text when newCursorPosition != 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/InputMethodController.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/InputMethodControllerTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
index 4d5a7cc81de66b42ed7fc9cfaa6aeb482613c09c..08dfe815b970f8a0188b5dafef4a55893c77c6b2 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
@@ -347,36 +347,6 @@
EXPECT_STREQ("hello\nworld\n01234AB56789", div->innerText().utf8().data());
EXPECT_EQ(24u, controller().getSelectionOffsets().start());
EXPECT_EQ(24u, controller().getSelectionOffsets().end());
-}
-
-TEST_F(InputMethodControllerTest, SetCompositionWithEmptyText)
-{
- Element* div = insertHTMLElement(
- "<div id='sample' contenteditable='true'>hello</div>",
- "sample");
-
- controller().setEditableSelectionOffsets(PlainTextRange(2, 2));
- EXPECT_STREQ("hello", div->innerText().utf8().data());
- EXPECT_EQ(2u, controller().getSelectionOffsets().start());
- EXPECT_EQ(2u, controller().getSelectionOffsets().end());
-
- Vector<CompositionUnderline> underlines0;
- underlines0.append(CompositionUnderline(0, 0, Color(255, 0, 0), false, 0));
- Vector<CompositionUnderline> underlines2;
- underlines2.append(CompositionUnderline(0, 2, Color(255, 0, 0), false, 0));
-
- controller().setComposition("AB", underlines2, 2, 2);
- // With previous composition.
- controller().setComposition("", underlines0, 2, 2);
- EXPECT_STREQ("hello", div->innerText().utf8().data());
- EXPECT_EQ(4u, controller().getSelectionOffsets().start());
- EXPECT_EQ(4u, controller().getSelectionOffsets().end());
-
- // Without previous composition.
- controller().setComposition("", underlines0, -1, -1);
- EXPECT_STREQ("hello", div->innerText().utf8().data());
- EXPECT_EQ(3u, controller().getSelectionOffsets().start());
- EXPECT_EQ(3u, controller().getSelectionOffsets().end());
}
TEST_F(InputMethodControllerTest, CompositionInputEventIsComposing)
« no previous file with comments | « third_party/WebKit/Source/core/editing/InputMethodController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698