Chromium Code Reviews| 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 106b8accaecba1c089f187bc5c12753109d12a26..45f71d19a0b230c212348964ef99cf09a4002d6f 100644 |
| --- a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp |
| +++ b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp |
| @@ -1169,6 +1169,20 @@ TEST_F(InputMethodControllerTest, FinishCompositionRemovedRange) { |
| EXPECT_EQ(WebTextInputTypeTelephone, controller().textInputType()); |
| } |
| +TEST_F(InputMethodControllerTest, ReflectsSpaceWithoutNbspMangling) { |
| + insertHTMLElement("<div id='sample' contenteditable></div>", "sample"); |
| + |
| + Vector<CompositionUnderline> underlines; |
| + controller().commitText(String(" "), underlines, 0); |
| + |
| + // In a contenteditable, multiple spaces or a space at the edge needs to be |
|
aelias_OOO_until_Jul13
2017/01/25 04:34:09
Done.
|
| + // nbsp to affect layout properly, but it confuses some IMEs (particularly |
| + // Vietnamese, see crbug.com/663880) to have their spaces reflected back to |
| + // them as nbsp. |
| + EXPECT_EQ(' ', controller().textInputInfo().value.ascii()[0]); |
| + EXPECT_EQ(' ', controller().textInputInfo().value.ascii()[1]); |
| +} |
| + |
| TEST_F(InputMethodControllerTest, SetCompositionPlainTextWithUnderline) { |
| insertHTMLElement("<div id='sample' contenteditable></div>", "sample"); |