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

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

Issue 1847583003: Fix setComposingText when newCursorPosition != 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modified some C++ unit tests Created 4 years, 8 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
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 8378cfd7faeab0d62587fa4938265288c6028f32..25482698c447dda0f0ecea36f7148ee0807bb6f1 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
@@ -174,7 +174,10 @@ TEST_F(InputMethodControllerTest, SetCompositionFromExistingTextWithInvalidOffse
underlines.append(CompositionUnderline(7, 8, Color(255, 0, 0), false, 0));
controller().setCompositionFromExistingText(underlines, 7, 8);
- EXPECT_FALSE(controller().compositionRange());
+ // If it exceeds the right boundary, it should stay at the right boundary
+ RawPtr<Range> range = controller().compositionRange();
+ EXPECT_EQ(6, range->startOffset());
+ EXPECT_EQ(6, range->endOffset());
Changwan Ryu 2016/04/05 07:50:37 I think you need more tests, e.g. (-1, 8), (-4, -2
yabinh 2016/04/05 08:06:41 Acknowledged.
}
TEST_F(InputMethodControllerTest, ConfirmPasswordComposition)

Powered by Google App Engine
This is Rietveld 408576698