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

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

Issue 2644623003: Revert 'Make "compositionend" event fired after setting caret position' (Closed)
Patch Set: Add updateStyleAndLayoutIgnorePendingStylesheets Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/InputMethodController.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7077f0287adddde10efb72b763c62949b02dd796 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
@@ -1071,64 +1071,6 @@ TEST_F(InputMethodControllerTest, CompositionInputEventForInsertEmptyText) {
document().title().utf8().data());
}
-TEST_F(InputMethodControllerTest, CompositionEndEventForConfirm) {
- createHTMLWithCompositionEndEventListener(CaretSelection);
-
- // Simulate composition in the |contentEditable|.
- Vector<CompositionUnderline> underlines;
- underlines.push_back(CompositionUnderline(0, 5, Color(255, 0, 0), false, 0));
-
- controller().setComposition("hello", underlines, 1, 1);
- document().updateStyleAndLayout();
- EXPECT_EQ(1u, controller().getSelectionOffsets().start());
- EXPECT_EQ(1u, controller().getSelectionOffsets().end());
-
- // Confirm the ongoing composition. Note that it moves the caret to the end of
- // text [5,5] before firing 'compositonend' event.
- controller().finishComposingText(InputMethodController::DoNotKeepSelection);
- document().updateStyleAndLayout();
- EXPECT_EQ(3u, controller().getSelectionOffsets().start());
- EXPECT_EQ(3u, controller().getSelectionOffsets().end());
-}
-
-TEST_F(InputMethodControllerTest, CompositionEndEventForInsert) {
- createHTMLWithCompositionEndEventListener(CaretSelection);
-
- // Simulate composition in the |contentEditable|.
- Vector<CompositionUnderline> underlines;
- underlines.push_back(CompositionUnderline(0, 5, Color(255, 0, 0), false, 0));
-
- controller().setComposition("n", underlines, 1, 1);
-
- // Insert new text with previous composition. Note that it moves the caret to
- // [4,4] before firing 'compositonend' event.
- document().updateStyleAndLayout();
- controller().commitText("hello", underlines, -1);
- document().updateStyleAndLayout();
- EXPECT_EQ(3u, controller().getSelectionOffsets().start());
- EXPECT_EQ(3u, controller().getSelectionOffsets().end());
-}
-
-TEST_F(InputMethodControllerTest, CompositionEndEventWithRangeSelection) {
- createHTMLWithCompositionEndEventListener(RangeSelection);
-
- // Simulate composition in the |contentEditable|.
- Vector<CompositionUnderline> underlines;
- underlines.push_back(CompositionUnderline(0, 5, Color(255, 0, 0), false, 0));
-
- controller().setComposition("hello", underlines, 1, 1);
- document().updateStyleAndLayout();
- EXPECT_EQ(1u, controller().getSelectionOffsets().start());
- EXPECT_EQ(1u, controller().getSelectionOffsets().end());
-
- // Confirm the ongoing composition. Note that it moves the caret to the end of
- // text [5,5] before firing 'compositonend' event.
- controller().finishComposingText(InputMethodController::DoNotKeepSelection);
- document().updateStyleAndLayout();
- EXPECT_EQ(2u, controller().getSelectionOffsets().start());
- EXPECT_EQ(4u, controller().getSelectionOffsets().end());
-}
-
TEST_F(InputMethodControllerTest, CompositionEndEventWithNoSelection) {
createHTMLWithCompositionEndEventListener(NoSelection);
« no previous file with comments | « third_party/WebKit/Source/core/editing/InputMethodController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698