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

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

Issue 2073863003: [WIP, not for review] Workaround for setComposition styling clobber (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 b176244dce8033ea84b758f52b67d042185fbfce..99a032cfef1373fd13d5ef9ff19ae381d97a4bbc 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
@@ -107,6 +107,13 @@ TEST_F(InputMethodControllerTest, SetCompositionFromExistingText)
PlainTextRange plainTextRange(PlainTextRange::create(*div, *range));
EXPECT_EQ(0u, plainTextRange.start());
EXPECT_EQ(5u, plainTextRange.end());
+
+ controller().setComposition(String("hellobar"), underlines, 8, 8);
+ range = controller().compositionRange();
+ EXPECT_EQ(0, range->startOffset());
+ EXPECT_EQ(8, range->endOffset());
+
+ controller().confirmComposition();
}
TEST_F(InputMethodControllerTest, SelectionOnConfirmExistingText)

Powered by Google App Engine
This is Rietveld 408576698