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

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

Issue 2703313002: Expand FrameSeleciton::end() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-21T12:26:29 Created 3 years, 10 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
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 af4913f8026b15cf7dc9fdb0f1393e7f3ac4e5c8..f447f168e109bbc77c88029960972c5cead6a944 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
@@ -194,7 +194,11 @@ TEST_F(InputMethodControllerTest, SetCompositionAfterEmoji) {
document().updateStyleAndLayout();
controller().setEditableSelectionOffsets(PlainTextRange(2, 2));
EXPECT_EQ(2, frame().selection().start().computeOffsetInContainerNode());
- EXPECT_EQ(2, frame().selection().end().computeOffsetInContainerNode());
+ EXPECT_EQ(2, frame()
+ .selection()
+ .computeVisibleSelectionInDOMTreeDeprecated()
+ .end()
+ .computeOffsetInContainerNode());
controller().setComposition(String("a"), underlines, 1, 1);
EXPECT_STREQ("\xF0\x9F\x8F\x86\x61", div->innerText().utf8().data());
@@ -342,7 +346,11 @@ TEST_F(InputMethodControllerTest, SelectionOnConfirmExistingText) {
controller().finishComposingText(InputMethodController::KeepSelection);
EXPECT_EQ(0, frame().selection().start().computeOffsetInContainerNode());
- EXPECT_EQ(0, frame().selection().end().computeOffsetInContainerNode());
+ EXPECT_EQ(0, frame()
+ .selection()
+ .computeVisibleSelectionInDOMTreeDeprecated()
+ .end()
+ .computeOffsetInContainerNode());
}
TEST_F(InputMethodControllerTest, DeleteBySettingEmptyComposition) {

Powered by Google App Engine
This is Rietveld 408576698