Chromium Code Reviews| Index: ui/views/controls/textfield/textfield_views_model_unittest.cc |
| =================================================================== |
| --- ui/views/controls/textfield/textfield_views_model_unittest.cc (revision 111944) |
| +++ ui/views/controls/textfield/textfield_views_model_unittest.cc (working copy) |
| @@ -185,6 +185,7 @@ |
| EXPECT_EQ(WideToUTF16(L"\x0061\x0062\x0915\x0915\x094d\x092e\x094d"), |
| model.GetText()); |
| model.MoveCursorTo(gfx::SelectionModel(model.GetText().length())); |
| + EXPECT_EQ(model.GetText().length(), model.GetCursorPosition()); |
| EXPECT_TRUE(model.Backspace()); |
| EXPECT_EQ(WideToUTF16(L"\x0061\x0062\x0915\x0915\x094d\x092e"), |
| model.GetText()); |
| @@ -203,16 +204,17 @@ |
| EXPECT_EQ(0U, model.GetCursorPosition()); |
| #endif |
| - model.MoveCursorTo(gfx::SelectionModel(2)); |
| - EXPECT_EQ(2U, model.GetCursorPosition()); |
| - |
| model.MoveCursorTo(gfx::SelectionModel(3)); |
| EXPECT_EQ(3U, model.GetCursorPosition()); |
| + // TODO(asvitkine): Temporarily disable the following check on Windows. It |
| + // seems Windows treats "\x0D38\x0D4D\x0D15" as a single grapheme. |
| +#if !defined(OS_WIN) |
| model.MoveCursorTo(gfx::SelectionModel(2)); |
| - |
| + EXPECT_EQ(2U, model.GetCursorPosition()); |
| EXPECT_TRUE(model.Backspace()); |
| EXPECT_EQ(WideToUTF16(L"\x0D38\x0D15\x0D16\x0D2E"), model.GetText()); |
| +#endif |
| // Test Delete/Backspace on Hebrew with non-spacing marks. |
| // TODO(xji): temporarily disable in platform Win since the complex script |
|
msw
2011/11/29 20:42:00
Can we enable these codepaths on Windows now that
xji
2011/11/29 21:15:48
Agree.
|
| @@ -561,7 +563,7 @@ |
| EXPECT_EQ(29U, model.GetCursorPosition()); |
| } |
| -void SelectWordTestVerifier(TextfieldViewsModel &model, |
| +static void SelectWordTestVerifier(const TextfieldViewsModel& model, |
| const string16 &expected_selected_string, size_t expected_cursor_pos) { |
| EXPECT_EQ(expected_selected_string, model.GetSelectedText()); |
| EXPECT_EQ(expected_cursor_pos, model.GetCursorPosition()); |