| 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 1d1eaf64d0da2b65835dd646f456a9ec1104c2e7..b16743d164794b7ea10622130c10567b9eff7206 100644
|
| --- a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
|
| @@ -187,6 +187,24 @@ TEST_F(InputMethodControllerTest,
|
| EXPECT_STREQ("<b>\xE0\xB0\x83</b>", div->innerHTML().utf8().data());
|
| }
|
|
|
| +TEST_F(InputMethodControllerTest, FinishComposingTextKeepingStyle) {
|
| + Element* div = insertHTMLElement(
|
| + "<div id='sample' "
|
| + "contenteditable='true'>k<b>i</b>d</div>",
|
| + "sample");
|
| +
|
| + Vector<CompositionUnderline> underlines;
|
| + underlines.append(CompositionUnderline(0, 3, Color(255, 0, 0), false, 0));
|
| + controller().setCompositionFromExistingText(underlines, 0, 3);
|
| +
|
| + // Append a character.
|
| + controller().setComposition(String("kids"), underlines, 4, 4);
|
| + EXPECT_STREQ("k<b>i</b>ds", div->innerHTML().utf8().data());
|
| +
|
| + controller().finishComposingText(InputMethodController::KeepSelection);
|
| + EXPECT_STREQ("k<b>i</b>ds", div->innerHTML().utf8().data());
|
| +}
|
| +
|
| TEST_F(InputMethodControllerTest, SelectionOnConfirmExistingText) {
|
| insertHTMLElement("<div id='sample' contenteditable='true'>hello world</div>",
|
| "sample");
|
|
|