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

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

Issue 2227333002: Revert of Change InputMethodController#setSelectionOffsets() to use NotUserTriggered parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 8f50a34be0eda8cf813c6d5dccf8a6f235cebbd7..0d41845bbc8dee65ee09717f7837aa4703645ae6 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
@@ -7,7 +7,6 @@
#include "core/dom/Document.h"
#include "core/dom/Element.h"
#include "core/dom/Range.h"
-#include "core/editing/Editor.h"
#include "core/editing/FrameSelection.h"
#include "core/events/MouseEvent.h"
#include "core/frame/FrameView.h"
@@ -378,25 +377,6 @@
EXPECT_STREQ("hello", div->innerText().utf8().data());
EXPECT_EQ(3u, controller().getSelectionOffsets().start());
EXPECT_EQ(3u, controller().getSelectionOffsets().end());
-}
-
-TEST_F(InputMethodControllerTest, InsertLineBreakWhileComposingText)
-{
- Element* div = insertHTMLElement(
- "<div id='sample' contenteditable='true'></div>",
- "sample");
-
- Vector<CompositionUnderline> underlines;
- underlines.append(CompositionUnderline(0, 5, Color(255, 0, 0), false, 0));
- controller().setComposition("hello", underlines, 5, 5);
- EXPECT_STREQ("hello", div->innerText().utf8().data());
- EXPECT_EQ(5u, controller().getSelectionOffsets().start());
- EXPECT_EQ(5u, controller().getSelectionOffsets().end());
-
- frame().editor().insertLineBreak();
- EXPECT_STREQ("\n\n", div->innerText().utf8().data());
- EXPECT_EQ(1u, controller().getSelectionOffsets().start());
- EXPECT_EQ(1u, controller().getSelectionOffsets().end());
}
TEST_F(InputMethodControllerTest, CompositionInputEventIsComposing)
« 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